Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable multiple installations by not failing if all existing default resources exists #89

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Enable multiple installations by not failing if all existing default …

e452993
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Open

Enable multiple installations by not failing if all existing default resources exists #89

Enable multiple installations by not failing if all existing default …
e452993
Select commit
Loading
Failed to load commit list.
GitHub Actions / JUnit Test Report failed Dec 22, 2024 in 0s

39 tests run, 36 passed, 0 skipped, 3 failed.

Annotations

Check failure on line 1 in com/port-labs/port-k8s-exporter/pkg/crd

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

com/port-labs/port-k8s-exporter/pkg/crd.TestCRD_crd_autoDiscoverCRDsToActionsNamespaced/Check_blueprint

Failed
Raw output
=== RUN   TestCRD_crd_autoDiscoverCRDsToActionsNamespaced/Check_blueprint
    crd_test.go:162: Blueprint not found
--- FAIL: TestCRD_crd_autoDiscoverCRDsToActionsNamespaced/Check_blueprint (0.00s)

Check failure on line 1 in com/port-labs/port-k8s-exporter/pkg/crd

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

com/port-labs/port-k8s-exporter/pkg/crd.TestCRD_crd_autoDiscoverCRDsToActionsNamespaced

Failed
Raw output
=== RUN   TestCRD_crd_autoDiscoverCRDsToActionsNamespaced
I1222 16:48:24.714538   10927 crd.go:373] Discovering CRDs/XRDs with pattern: true
E1222 16:48:27.227568   10927 crd.go:344] Error creating blueprint: error creating blueprint: failed to create blueprint, got: {"ok":false,"error":"role_not_found","message":"Role with name \"bp_dPUOGyBSEINC56US-moderator\" was not found","details":{"field":"name","value":"bp_dPUOGyBSEINC56US-moderator"}}
E1222 16:48:27.331822   10927 crd.go:360] Error creating blueprint action: failed to create action, got: {"ok":false,"error":"not_found","message":"Blueprint with identifier \"k8s-crd-test-361278294038\" was not found","details":{"resource":"Blueprint","byField":"identifier","withValue":"k8s-crd-test-361278294038"}}
E1222 16:48:27.438268   10927 crd.go:360] Error creating blueprint action: failed to create action, got: {"ok":false,"error":"not_found","message":"Blueprint with identifier \"k8s-crd-test-361278294038\" was not found","details":{"resource":"Blueprint","byField":"identifier","withValue":"k8s-crd-test-361278294038"}}
E1222 16:48:27.531746   10927 crd.go:360] Error creating blueprint action: failed to create action, got: {"ok":false,"error":"not_found","message":"Blueprint with identifier \"k8s-crd-test-361278294038\" was not found","details":{"resource":"Blueprint","byField":"identifier","withValue":"k8s-crd-test-361278294038"}}
    crd_test.go:158: Error getting blueprint: error getting Port blueprint: failed to get blueprint, got: {"ok":false,"error":"not_found","message":"Blueprint with identifier \"k8s-crd-test-361278294038\" was not found","details":{"resource":"Blueprint","byField":"identifier","withValue":"k8s-crd-test-361278294038"}}
--- FAIL: TestCRD_crd_autoDiscoverCRDsToActionsNamespaced (3.67s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0x142019c]

goroutine 99 [running]:
testing.tRunner.func1.2({0x152a860, 0x243ab10})
	/opt/hostedtoolcache/go/1.22.10/x64/src/testing/testing.go:1631 +0x24a
testing.tRunner.func1()
	/opt/hostedtoolcache/go/1.22.10/x64/src/testing/testing.go:1634 +0x377
panic({0x152a860?, 0x243ab10?})
	/opt/hostedtoolcache/go/1.22.10/x64/src/runtime/panic.go:770 +0x132
github.com/port-labs/port-k8s-exporter/pkg/crd.checkBlueprintAndActionsProperties.func1(0xc0004d8000)
	/home/runner/work/port-k8s-exporter/port-k8s-exporter/pkg/crd/crd_test.go:164 +0x5c
testing.tRunner(0xc0004d8000, 0xc0005a77d0)
	/opt/hostedtoolcache/go/1.22.10/x64/src/testing/testing.go:1689 +0xfb
created by testing.(*T).Run in goroutine 72
	/opt/hostedtoolcache/go/1.22.10/x64/src/testing/testing.go:1742 +0x390

Check failure on line 1 in com/port-labs/port-k8s-exporter/pkg/defaults

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

com/port-labs/port-k8s-exporter/pkg/defaults.Test_InitIntegration_InitDefaults

Failed
Raw output
=== RUN   Test_InitIntegration_InitDefaults
I1222 16:48:16.762148   10929 init.go:20] Initializing Port integration
I1222 16:48:16.912037   10929 init.go:31] Could not get integration with state key 1fee9380-4b68-4853-bbb7-e190230b727f, error: error getting Port integration: failed to get integration, got: {"ok":false,"error":"not_found","message":"Integration with installationId \"1fee9380-4b68-4853-bbb7-e190230b727f\" was not found","details":{"resource":"Integration","byField":"installationId","withValue":"1fee9380-4b68-4853-bbb7-e190230b727f"}}
I1222 16:48:16.912050   10929 init.go:32] Creating integration
I1222 16:48:16.912055   10929 init.go:37] Creating default resources
I1222 16:48:21.694192   10929 defaults.go:199] Created blueprint cluster
I1222 16:48:21.720963   10929 defaults.go:199] Created blueprint namespace
I1222 16:48:21.846183   10929 defaults.go:199] Created blueprint workload
W1222 16:48:28.100771   10929 defaults.go:249] Failed to create page workload_overview_dashboard: error creating Port page: failed to create page, got: {"ok":false,"error":"role_not_found","message":"Role with name \"bp_7wTqoILZf0HNbASI-moderator\" was not found","details":{"field":"name","value":"bp_7wTqoILZf0HNbASI-moderator"}}
I1222 16:48:28.346081   10929 defaults.go:252] Created page availability_scorecard_dashboard
I1222 16:48:28.346110   10929 defaults.go:138] Failed to create resources: error creating Port page: failed to create page, got: {"ok":false,"error":"role_not_found","message":"Role with name \"bp_7wTqoILZf0HNbASI-moderator\" was not found","details":{"field":"name","value":"bp_7wTqoILZf0HNbASI-moderator"}}.
I1222 16:48:30.165123   10929 init.go:42] Default resources created successfully
    defaults_test.go:92: 
        	Error Trace:	/home/runner/work/port-k8s-exporter/port-k8s-exporter/pkg/defaults/defaults_test.go:92
        	Error:      	Expected nil, but got: &errors.errorString{s:"error getting Port page: failed to get page, got: {\"ok\":false,\"error\":\"not_found\",\"message\":\"Page with identifier \\\"workload_overview_dashboard\\\" was not found\",\"details\":{\"resource\":\"Page\",\"byField\":\"identifier\",\"withValue\":\"workload_overview_dashboard\"}}"}
        	Test:       	Test_InitIntegration_InitDefaults
    defaults_test.go:27: Deleting default resources for 1fee9380-4b68-4853-bbb7-e190230b727f
--- FAIL: Test_InitIntegration_InitDefaults (26.97s)