fix: Removing ttl.sh from PCO on main branch - #302
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #302 +/- ##
=======================================
Coverage 18.33% 18.33%
=======================================
Files 3 3
Lines 60 60
=======================================
Hits 11 11
Misses 49 49
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
PR Summary by QodoFix e2e image publishing by replacing ttl.sh with Quay digest refs
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1. Hardcoded Quay push auth
|
| pusher, err := remote.NewPusher(remote.WithAuthFromKeychain(authn.DefaultKeychain)) | ||
| if err != nil { | ||
| panic(err.Error()) | ||
| } |
There was a problem hiding this comment.
1. Hardcoded quay push auth 🐞 Bug ☼ Reliability
PrepareImage now always pushes to the hardcoded repo quay.io/securesign/e2e-tests using authn.DefaultKeychain and panics on failure, so e2e setup will abort in environments lacking Quay push credentials/permissions or registry access. This change makes the whole suite sensitive to external registry auth/availability before any test assertions run.
Agent Prompt
### Issue description
`PrepareImage` always pushes a random image to `quay.io/securesign/e2e-tests` using `authn.DefaultKeychain` and `panic`s on any error. This introduces a hard dependency on Quay credentials/permissions and registry reachability for all e2e runs.
### Issue Context
`PrepareImage` is called unconditionally in `BeforeAll` for multiple suites; a push/auth failure prevents all tests from running.
### Fix Focus Areas
- Add an env var (e.g. `E2E_TEST_IMAGE_REPO`) to configure the destination repo instead of hardcoding `quay.io/securesign/e2e-tests`.
- Improve failure mode: if push fails due to auth/permissions, return a clear error message explaining required credentials and how to override via env (instead of a bare `panic(err.Error())`).
- Keep the existing `imageENV` short-circuit, but ensure the default path is usable in CI and local dev with explicit configuration.
- test/utils/image.go[17-62]
- test/e2e/policy_controller_e2e_test.go[39-45]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
/retest |
| spec: | ||
| images: | ||
| - glob: "{{ .TEST_IMAGE_PREFIX }}**" | ||
| - glob: "{{ .TEST_IMAGE }}" |
There was a problem hiding this comment.
commonTestImage can be empty here because it's only set in the "common installation" tests, and Ginkgo doesn't guarantee which test group runs first. Revert the glob to "{{ .TEST_IMAGE_PREFIX }}**" so an empty value still produces a valid glob.
No description provided.