Adding custom test image repo to remove ttl.sh - #301
Conversation
PR Summary by QodoUse quay.io/securesign test image repo instead of ttl.sh
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1. Hardcoded Quay repo
|
| targetImageName := fmt.Sprintf("quay.io/tdalton/e2e-test:%s", uuid.New().String()) | ||
| ref, err := name.ParseReference(targetImageName) | ||
| if err != nil { | ||
| panic(err.Error()) |
There was a problem hiding this comment.
1. Hardcoded quay repo 🐞 Bug ☼ Reliability
PrepareImage now pushes generated images to the hard-coded repository quay.io/tdalton/e2e-test when COMMON_TEST_IMAGE/BYOK_TEST_IMAGE/etc are unset, which requires Quay credentials with write access to that repo and will fail in environments without them. This is a regression from the prior ttl.sh anonymous push flow and the repo/docs do not set/provision these credentials by default.
Agent Prompt
## Issue description
`PrepareImage` falls back to pushing a randomly generated image to a hard-coded Quay repository (`quay.io/tdalton/e2e-test`) using `authn.DefaultKeychain`. This introduces an implicit requirement that the caller environment is already authenticated to Quay and has push permission to that specific repository.
## Issue Context
E2E tests call `PrepareImage` unconditionally in `BeforeAll`, and the documented E2E workflow does not instruct users to set image env vars or log in to Quay. As a result, the default E2E path will fail for any developer/CI environment lacking those repo-specific credentials.
## Fix Focus Areas
- test/utils/image.go[17-55]
- README.md[96-126]
## Implementation guidance
- Add a new env var (e.g., `E2E_TEST_IMAGE_REPO` or `TEST_IMAGE_REPO`) that controls the destination repository/prefix, and default it to a neutral/shared location appropriate for CI (or require `imageENV` to be set and return a clear error).
- Keep `PrepareImage` behavior consistent with docs by either:
- updating README prerequisites to include registry auth + required permissions, and/or
- making the code fall back to a local/dev-friendly registry option.
- Consider allowing auth to be optionally disabled/overridden (e.g., if pushing to a registry that allows anonymous push).
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
/retest |
1 similar comment
|
/retest |
|
/tests |
|
/retest |
3 similar comments
|
/retest |
|
/retest |
|
/retest |
|
Code review by qodo was updated up to the latest commit 3b93435 |
|
/retest |
Changes to remove ttl.sh dependency from Policy Controller