Skip to content

Instantly share code, notes, and snippets.

View Boomatang's full-sized avatar

Jim Fitzpatrick Boomatang

View GitHub Profile
# cached : test true; all linters;
# real 0m3.790s
# user 0m7.850s
# sys 0m0.987s
#
# not cached : test true; all linters;
# real 1m21.400s
# user 9m15.791s
# sys 0m23.129s
#
@Boomatang
Boomatang / JIRA_FORMAT.md
Last active September 29, 2020 13:56
Scripts to help formating for creating jiras

This gist is to help with the creating of jiras and is a work in progress but will do some of the work for you.

These scripts require you to have srcclr and jq installed.

jira_format is the command line call that needs to be made.

Values in the script that need to be filled are: PACKAGE_NAME: Package where the issues are. VERSION: the version of the packaged wanting to be checked. PATH/TO/FILE: this is the path to the format.py that is included in this gist

{"level":"info","ts":1595346707.5021663,"logger":"controller_keycloakuser","msg":"Reconciling KeycloakUser","Request.Namespace":"redhat-rhmi-rhsso","Request.Name":"testing-idp-test-user01"}
{"level":"error","ts":1595346707.502245,"logger":"controller-runtime.controller","msg":"Reconciler error","controller":"keycloakuser-controller","request":"redhat-rhmi-rhsso/testing-idp-test-user01","error":"could not find matching []v1alpha1.KeycloakRealm objects","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/src/vendor/github.com/go-logr/zapr/zapr.go:128\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/src/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:258\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/src/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:232\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\t/src/vendor/sigs.k8s.io/con
@Boomatang
Boomatang / README.md
Last active September 22, 2020 12:52
This script will build the dependency tree for the a module and print out a list version of the tree.

This script will build the dependency tree for the a module and print out a list version of the tree. The first item on the list is the direct import into the project and then followed by the sub dependencies till the module been searched for is found. This script does require the use of go mod. Also note if the dependency graph is to large a recursion error with be throw.

To Run

The script is required to be ran from with in the go project folder but does not require to be in the root folder. If go mod graph works this script can work.

@Boomatang
Boomatang / ocmclusterstate.sh
Created June 26, 2020 08:15 — forked from dofinn/ocmclusterstate.sh
Get state of target cluster to trigger reminders of action.
#!/bin/bash
clusterIdentifier=$1
OCM=~/go/bin/ocm
/usr/local/bin/ocm-stg-login
clusterInfo=$(${OCM} cluster list --managed | grep ${clusterIdentifier})
clusterId=$(echo ${clusterInfo} | awk '{print $1}')
clusterName=$(echo ${clusterInfo} | awk '{print $2}')
@Boomatang
Boomatang / test-fail.log
Created May 13, 2020 09:39
Failing on gorouite that sometimes does not happen
GOROOT=/usr/bin/go #gosetup
GOPATH=/home/jimfitz/go #gosetup
/usr/bin/go/bin/go test -c -o /tmp/___Test_Integreatly_Functional github.com/integr8ly/integreatly-operator/test/functional #gosetup
/usr/bin/go/bin/go tool test2json -t /tmp/___Test_Integreatly_Functional -test.v -test.run ^TestIntegreatly$ #gosetup
=== RUN TestIntegreatly
=== RUN TestIntegreatly/Integreatly_Happy_Path_Tests
=== RUN TestIntegreatly/Integreatly_Happy_Path_Tests/Verify_RHMI_CRD_Exists
Process finished with exit code 1
=== RUN TestIntegreatly/Integreatly_Happy_Path_Tests/Verify_RHMI_Config_CRD_Exists
package common
import (
goctx "context"
enmasse "github.com/integr8ly/integreatly-operator/pkg/apis-products/enmasse/v1beta2"
"reflect"
k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
"testing"
)
NAME
alertmanagers.monitoring.coreos.com
builds.camel.apache.org
bundlebindings.automationbroker.io
bundleinstances.automationbroker.io
bundles.automationbroker.io
camelcatalogs.camel.apache.org
catalogsources.operators.coreos.com
checlusters.org.eclipse.che
clusterserviceversions.operators.coreos.com