chore(test): using alpine instead of wordpress#2733
chore(test): using alpine instead of wordpress#2733afdesk wants to merge 3 commits intoaquasecurity:mainfrom
Conversation
|
@simar7 could you take a look at this PR when you have time? |
|
I ran it locally but it doesn't seem stable. Is it due to this PR? |
|
@simar7 is there something strange in the logs? {"level":"error","ts":"2025-09-09T14:34:43+06:00","logger":"reconciler.scan job","msg":"Scan job container","job":"trivy-system/scan-vulnerabilityreport-98b66b69","container":"88e558cf-97c8-41a1-a5b3-da6e6f076d73","status.reason":"OOMKilled","status.message":"------------------>_] 97.69% 6.13 MiB p/s ETA 0s68.98 MiB / 70.12 MiB [------------------------------------------------>] 98.38% 6.13 MiB p/s ETA 0s70.12 MiB / 70.12 MiB [----------------------------------------------->] 100.00% 6.13 MiB p/s ETA 0s70.12 MiB / 70.12 MiB [----------------------------------------------->] 100.00% 5.91 MiB p/s ETA 0s70.12 MiB / 70.12 MiB [----------------------------------------------->] 100.00% 5.91 MiB p/s ETA 0s70.12 MiB / 70.12 MiB [----------------------------------------------->] 100.00% 5.91 MiB p/s ETA 0s70.12 MiB / 70.12 MiB [----------------------------------------------->] 100.00% 5.53 MiB p/s ETA 0s70.12 MiB / 70.12 MiB [----------------------------------------------->] 100.00% 5.53 MiB p/s ETA 0s70.12 MiB / 70.12 MiB [----------------------------------------------->] 100.00% 5.53 MiB p/s ETA 0s70.12 MiB / 70.12 MiB [----------------------------------------------->] 100.00% 5.17 MiB p/s ETA 0s70.12 MiB / 70.12 MiB [----------------------------------------------->] 100.00% 5.17 MiB p/s ETA 0s70.12 MiB / 70.12 MiB [----------------------------------------------->] 100.00% 5.17 MiB p/s ETA 0s70.12 MiB / 70.12 MiB [----------------------------------------------->] 100.00% 4.84 MiB p/s ETA 0s70.12 MiB / 70.12 MiB [----------------------------------------------->] 100.00% 4.84 MiB p/s ETA 0s70.12 MiB / 70.12 MiB [----------------------------------------------->] 100.00% 4.84 MiB p/s ETA 0s70.12 MiB / 70.12 MiB [----------------------------------------------->] 100.00% 4.52 MiB p/s ETA 0s70.12 MiB / 70.12 MiB [----------------------------------------------->] 100.00% 4.52 MiB p/s ETA 0s70.12 MiB / 70.12 MiB [----------------------------------------------->] 100.00% 4.52 MiB p/s ETA 0s70.12 MiB / 70.12 MiB [----------------------------------------------->] 100.00% 4.23 MiB p/s ETA 0s70.12 MiB / 70.12 MiB [----------------------------------------------->] 100.00% 4.23 MiB p/s ETA 0s70.12 MiB / 70.12 MiB [----------------------------------------------->] 100.00% 4.23 MiB p/s ETA 0s","stacktrace":"github.com/aquasecurity/trivy-operator/pkg/vulnerabilityreport/controller.(*ScanJobController).completedContainers\n\t/Users/amf/aqua/my-trivy-operator/pkg/vulnerabilityreport/controller/scanjob.go:441\ngithub.com/aquasecurity/trivy-operator/pkg/vulnerabilityreport/controller.(*ScanJobController).SetupWithManager.(*ScanJobController).reconcileJobs.func1\n\t/Users/amf/aqua/my-trivy-operator/pkg/vulnerabilityreport/controller/scanjob.go:103\nsigs.k8s.io/controller-runtime/pkg/reconcile.TypedFunc[...].Reconcile\n\t/Users/amf/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.21.0/pkg/reconcile/reconcile.go:134\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Reconcile\n\t/Users/amf/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.21.0/pkg/internal/controller/controller.go:119\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).reconcileHandler\n\t/Users/amf/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.21.0/pkg/internal/controller/controller.go:340\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).processNextWorkItem\n\t/Users/amf/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.21.0/pkg/internal/controller/controller.go:300\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func2.1\n\t/Users/amf/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.21.0/pkg/internal/controller/controller.go:202"} |
I just took another look at the log - nothing strange or unexpected. It just times out. The rest of the tests pass except this one. |
|
@afdesk just took another look at it - wouldn't changing the test image impact any assertions that we make? It seems that there's no updated test / broken test as part of this change but I expected there to be one. |
Unfortunately, the tests only verify the presence of vulnerability reports, not their actual content. |
I think we should address this. We should assert the content in addition to the presence as that's the only definitive way to know functionally if the expectation was correct or not. Could you do it as part of this PR? |
Description
This PR updates the base images used for scanning in integration tests — switching from
wordpresstoalpine.This reduces image pull time and simplifies running them locally on macOS with Apple processors.
Checklist