Skip to content

Conversation

@Skarlso
Copy link
Contributor

@Skarlso Skarlso commented Aug 15, 2025

What this PR does / why we need it

In an effort to better debug the e2e test failures, let's dump the flux controller logs as well after each test. The teardown should always run hopefully because we never FailNow() in the e2e framework.

If this isn't working on a failure, I'll have to decise an envtest.AfterEachTest version of the dump.

Which issue(s) this PR fixes

@Skarlso Skarlso requested a review from a team as a code owner August 15, 2025 07:16
@Skarlso
Copy link
Contributor Author

Skarlso commented Aug 15, 2025

Ah, invalid number of pods. I thought I could get away with this, but I can't. :D I will have to update the log dumper.

@Skarlso
Copy link
Contributor Author

Skarlso commented Aug 15, 2025

helm_test.go:82: Dumping logs for Pod: source-controller-54bc45dc6-kh6zk | Status: &PodStatus{Phase:Running,Conditions:[]PodCondition{PodCondition{Type:PodReadyToStartContainers,Status:True,LastProbeTime:0001-01-01 00:00:00 +0000 UTC,LastTransitionTime:2025-08-15 13:01:27 +0200 CEST,Reason:,Message:,ObservedGeneration:0,},PodCondition{Type:Initialized,Status:True,LastProbeTime:0001-01-01 00:00:00 +0000 UTC,LastTransitionTime:2025-08-15 13:00:44 +0200 CEST,Reason:,Message:,ObservedGeneration:0,},PodCondition{Type:Ready,Status:True,LastProbeTime:0001-01-01 00:00:00 +0000 UTC,LastTransitionTime:2025-08-15 13:01:27 +0200 CEST,Reason:,Message:,ObservedGeneration:0,},PodCondition{Type:ContainersReady,Status:True,LastProbeTime:0001-01-01 00:00:00 +0000 UTC,LastTransitionTime:2025-08-15 13:01:27 +0200 CEST,Reason:,Message:,ObservedGeneration:0,},PodCondition{Type:PodScheduled,Status:True,LastProbeTime:0001-01-01 00:00:00 +0000 UTC,LastTransitionTime:2025-08-15 13:00:44 +0200 CEST,Reason:,Message:,ObservedGeneration:0,},},Message:,Reason:,HostIP:172.18.0.3,PodIP:10.244.0.12,StartTime:2025-08-15 13:00:44 +0200 CEST,ContainerStatuses:[]ContainerStatus{ContainerStatus{Name:manager,State:ContainerState{Waiting:nil,Running:&ContainerStateRunning{StartedAt:2025-08-15 13:01:27 +0200 CEST,},Terminated:nil,},LastTerminationState:ContainerState{Waiting:nil,Running:nil,Terminated:nil,},Ready:true,RestartCount:0,Image:ghcr.io/fluxcd/source-controller:v1.6.2,ImageID:ghcr.io/fluxcd/source-controller@sha256:11c8e14df885eff86586533d9941293ec8a1e9fff71bacf119edc79fdf3c63e3,ContainerID:containerd://590fddda72262e5c917d7a937f0efa17f7ece6beaab2317774f85282857e4486,Started:*true,AllocatedResources:ResourceList{cpu: {{50 -3} {<nil>} 50m DecimalSI},memory: {{67108864 0} {<nil>}  BinarySI},},Resources:&ResourceRequirements{Limits:ResourceList{cpu: {{1 0} {<nil>} 1 DecimalSI},memory: {{1073741824 0} {<nil>} 1Gi BinarySI},},Requests:ResourceList{cpu: {{50 -3} {<nil>} 50m DecimalSI},memory: {{67108864 0} {<nil>}  BinarySI},},Claims:[]ResourceClaim{},},VolumeMounts:[]VolumeMountStatus{VolumeMountStatus{Name:data,MountPath:/data,ReadOnly:false,RecursiveReadOnly:nil,},VolumeMountStatus{Name:tmp,MountPath:/tmp,ReadOnly:false,RecursiveReadOnly:nil,},VolumeMountStatus{Name:kube-api-access-dbc4g,MountPath:/var/run/secrets/kubernetes.io/serviceaccount,ReadOnly:true,RecursiveReadOnly:*Disabled,},},User:&ContainerUser{Linux:&LinuxContainerUser{UID:65534,GID:65534,SupplementalGroups:[1337 65534],},},AllocatedResourcesStatus:[]ResourceStatus{},StopSignal:nil,},},QOSClass:Burstable,InitContainerStatuses:[]ContainerStatus{},NominatedNodeName:,PodIPs:[]PodIP{PodIP{IP:10.244.0.12,},},EphemeralContainerStatuses:[]ContainerStatus{},Resize:,ResourceClaimStatuses:[]PodResourceClaimStatus{},HostIPs:[]HostIP{HostIP{IP:172.18.0.3,},},ObservedGeneration:0,}
    helm_test.go:82: Pod: {map[app:source-controller] flux-system} | Log: {"level":"info","ts":"2025-08-15T11:01:27.279Z","logger":"setup","msg":"caching of Helm index files is disabled"}
        {"level":"info","ts":"2025-08-15T11:01:27.280Z","logger":"setup","msg":"starting manager"}
        {"level":"info","ts":"2025-08-15T11:01:27.280Z","logger":"controller-runtime.metrics","msg":"Starting metrics server"}
        {"level":"info","ts":"2025-08-15T11:01:27.280Z","logger":"controller-runtime.metrics","msg":"Serving metrics server","bindAddress":":8080","secure":false}
        {"level":"info","ts":"2025-08-15T11:01:27.280Z","msg":"starting server","name":"health probe","addr":"[::]:9440"}
        {"level":"info","ts":"2025-08-15T11:01:27.381Z","logger":"runtime","msg":"attempting to acquire leader lease flux-system/source-controller-leader-election..."}
        {"level":"info","ts":"2025-08-15T11:01:27.384Z","logger":"runtime","msg":"successfully acquired lease flux-system/source-controller-leader-election"}
        {"level":"info","ts":"2025-08-15T11:01:27.384Z","msg":"Starting EventSource","controller":"gitrepository","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"GitRepository","source":"kind source: *v1.GitRepository"}
        {"level":"info","ts":"2025-08-15T11:01:27.384Z","msg":"Starting EventSource","controller":"helmchart","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"HelmChart","source":"kind source: *v1.Bucket"}
        {"level":"info","ts":"2025-08-15T11:01:27.385Z","msg":"Starting EventSource","controller":"helmrepository","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"HelmRepository","source":"kind source: *v1.HelmRepository"}
        {"level":"info","ts":"2025-08-15T11:01:27.385Z","msg":"Starting EventSource","controller":"ocirepository","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"OCIRepository","source":"kind source: *v1.OCIRepository"}
        {"level":"info","ts":"2025-08-15T11:01:27.385Z","msg":"Starting EventSource","controller":"helmchart","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"HelmChart","source":"kind source: *v1.HelmChart"}
        {"level":"info","ts":"2025-08-15T11:01:27.385Z","msg":"Starting EventSource","controller":"helmchart","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"HelmChart","source":"kind source: *v1.HelmRepository"}
        {"level":"info","ts":"2025-08-15T11:01:27.386Z","msg":"Starting EventSource","controller":"helmchart","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"HelmChart","source":"kind source: *v1.GitRepository"}
        {"level":"info","ts":"2025-08-15T11:01:27.386Z","msg":"Starting EventSource","controller":"bucket","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"Bucket","source":"kind source: *v1.Bucket"}
        {"level":"info","ts":"2025-08-15T11:01:27.387Z","logger":"setup","msg":"starting file server"}
        {"level":"info","ts":"2025-08-15T11:01:27.485Z","msg":"Starting Controller","controller":"gitrepository","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"GitRepository"}
        {"level":"info","ts":"2025-08-15T11:01:27.485Z","msg":"Starting workers","controller":"gitrepository","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"GitRepository","worker count":2}
        {"level":"info","ts":"2025-08-15T11:01:27.487Z","msg":"Starting Controller","controller":"bucket","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"Bucket"}
        {"level":"info","ts":"2025-08-15T11:01:27.487Z","msg":"Starting workers","controller":"bucket","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"Bucket","worker count":2}
        {"level":"info","ts":"2025-08-15T11:01:27.487Z","msg":"Starting Controller","controller":"helmrepository","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"HelmRepository"}
        {"level":"info","ts":"2025-08-15T11:01:27.487Z","msg":"Starting workers","controller":"helmrepository","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"HelmRepository","worker count":2}
        {"level":"info","ts":"2025-08-15T11:01:27.487Z","msg":"Starting Controller","controller":"ocirepository","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"OCIRepository"}
        {"level":"info","ts":"2025-08-15T11:01:27.487Z","msg":"Starting workers","controller":"ocirepository","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"OCIRepository","worker count":2}
        {"level":"info","ts":"2025-08-15T11:01:27.487Z","msg":"Starting Controller","controller":"helmchart","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"HelmChart"}
        {"level":"info","ts":"2025-08-15T11:01:27.487Z","msg":"Starting workers","controller":"helmchart","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"HelmChart","worker count":2}
        {"level":"info","ts":"2025-08-15T11:01:38.262Z","msg":"metadata.finalizers: \"finalizers.fluxcd.io\": prefer a domain-qualified finalizer name including a path (/) to avoid accidental conflicts with other finalizer writers","controller":"gitrepository","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"GitRepo

Should be working now. Just need to release ocm-e2e-framework first: open-component-model/ocm-e2e-framework#170

@Skarlso
Copy link
Contributor Author

Skarlso commented Aug 15, 2025

PASS
ok      github.com/open-component-model/ocm-controller/e2e      285.023s

DONE 65 tests in 285.024s

@Skarlso Skarlso merged commit 3bf7a94 into open-component-model:main Aug 18, 2025
9 checks passed
@Skarlso Skarlso deleted the fix-e2e-test-2 branch August 18, 2025 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants