Skip to content

test(e2e): handle registry ports in combined image names - #2702

Open
myetcd wants to merge 1 commit into
cosmos:mainfrom
myetcd:main
Open

myetcd wants to merge 1 commit into
cosmos:mainfrom
myetcd:main

Conversation

@myetcd

@myetcd myetcd commented Sep 30, 2026

Copy link
Copy Markdown

Description

Closes: #2701

Extract source image tags after the last slash when naming combined provider/consumer images. The existing strings.Split(image, ":")[1] expression turns localhost:5000/org/repo:v1 into 5000/org/repo, resulting in an incorrect combined image name.

This is defensive hardening of the E2E naming logic: current source-image builders use hard-coded GHCR or local names, and --docker-image bypasses the combined build. This change does not introduce custom-registry configuration.

tests/e2e/docker_image.go contains the naming helper, and tests/e2e/test_target.go propagates its errors. Explicit tags are required; missing tags and digest references return errors. Regression tests cover local/GHCR names, registry ports on both images, mixed sources, local build tags, IPv6 registries, and unsupported references. The E2E README documents the naming contract.

Validation:

  • The original naming expression fails the registry-port, mixed-source, and IPv6 regression cases.
  • go test ./tests/e2e -run '^TestCombinedDockerImageName' -count=1 passed.
  • go test ./tests/e2e -skip '^TestWriteExamples$' -count=1 passed (the skipped test generates example files).
  • git diff --check passed.
  • make lint passed (0 issues).
  • make build passed.
  • make test-unit passed.
  • Docker-backed E2E tests have not been run: the local Docker daemon is unavailable.

Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • Included the correct type prefix in the PR title
  • Targeted the correct branch (see PR Targeting)
  • Provided a link to the relevant issue or specification
  • Reviewed "Files changed" and left comments if necessary (no inline comments needed)
  • Confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • Confirmed the correct type prefix in the PR title
  • Confirmed all author checklist items have been addressed
  • Confirmed that this PR does not change production code

Signed-off-by: myetcd <mytech@139.com>
@greptile-apps

greptile-apps Bot commented Sep 30, 2026

Copy link
Copy Markdown

PR author is not in the allowed authors list.

@github-actions github-actions Bot added the C:Testing Assigned automatically by the PR labeler label Sep 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C:Testing Assigned automatically by the PR labeler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Combined E2E image naming misparses registry ports

1 participant