Skip to content

[DX-3581] revamp private/public images handling in cre system tests pipeline#21915

Merged
Tofel merged 3 commits intodevelopfrom
dx-3581-system-tests-public-image-revamp
Apr 9, 2026
Merged

[DX-3581] revamp private/public images handling in cre system tests pipeline#21915
Tofel merged 3 commits intodevelopfrom
dx-3581-system-tests-public-image-revamp

Conversation

@Tofel
Copy link
Copy Markdown
Contributor

@Tofel Tofel commented Apr 8, 2026

This change simplifies Chainlink image resolution to always compose the final image from explicit inputs and ECR_TYPE:

  • Required inputs: ECR_TYPE, CHAINLINK_IMAGE_REPO, CHAINLINK_IMAGE_TAG
  • ECR_TYPE must be one of:
    • publicpublic.ecr.aws/<repository>:<image_tag>
    • sdlc<aws_account>.dkr.ecr.<aws_region>.amazonaws.com/<repository>:<image_tag>
  • For sdlc, both AWS_ACCOUNT_NUMBER and AWS_REGION evn vars are required

Inputs are trimmed and lowercased before validation/resolution.

Tests:

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

✅ No conflicts with other open PRs targeting develop

fi

if [[ "${ecr_type}" == "public" ]]; then
printf '%s\n' "gallery.ecr.aws/${repository}:${image_tag}"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
printf '%s\n' "gallery.ecr.aws/${repository}:${image_tag}"
printf '%s\n' "public.ecr.aws/${repository}:${image_tag}"

Also our public images have a namespace prefix like:

public.ecr.aws/chainlink/chainlink:2.32.0

Copy link
Copy Markdown
Contributor Author

@Tofel Tofel Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they do, but in my mind we can pass chainlink/chainlink as repository (path). You can find a run that used that input value here: https://github.com/smartcontractkit/chainlink/actions/runs/24145193704/job/70457263811

@trunk-io
Copy link
Copy Markdown

trunk-io bot commented Apr 8, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@Tofel Tofel force-pushed the dx-3581-system-tests-public-image-revamp branch from f73f1f9 to db99401 Compare April 8, 2026 16:00
@Tofel Tofel requested review from chainchad and skudasov April 8, 2026 16:50
@Tofel Tofel marked this pull request as ready for review April 9, 2026 09:19
@Tofel Tofel requested review from a team as code owners April 9, 2026 09:19
Copilot AI review requested due to automatic review settings April 9, 2026 09:19
@Tofel Tofel added this pull request to the merge queue Apr 9, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Risk Rating: MEDIUM — Changes affect how CI resolves/pulls Chainlink images for CRE system tests and can break runs if image tags/refs are altered unexpectedly.

This PR simplifies CRE system tests image selection by requiring explicit inputs (ECR type + repo path + tag) and resolving the final Chainlink image reference deterministically for either SDLC (private) or public ECR.

Changes:

  • Update CRE system tests workflow inputs to require ecr, chainlink_image_repository_path, and chainlink_image_tag, removing the “full image” pathway.
  • Update the integration tests workflow to pass the new inputs to cre-system-tests.yaml.
  • Refactor the image resolver script and its tests to use ECR_TYPE and the new env var names, including trimming + case normalization.

Scrupulous human review recommended (high impact / easy to break CI):

  • .github/scripts/resolve-chainlink-image.sh input normalization and the exact output image string formatting.
  • Workflow input renames and callsites (.github/workflows/cre-system-tests.yaml and .github/workflows/integration-tests.yml) to ensure no remaining callers rely on the old input contract.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/integration-tests.yml Updates the reusable workflow call to pass ecr + repository path/tag inputs.
.github/workflows/cre-system-tests.yaml Revamps workflow inputs and wires them into the image resolver step.
.github/scripts/resolve-chainlink-image.sh New resolver contract: compose image from ECR_TYPE + repo path + tag (with trimming/lowercasing).
.github/scripts/resolve-chainlink-image_test.sh Updates unit tests for the new resolver contract and validation paths.

Comment on lines +39 to +42
# Normalize all input fields to lowercase for case-insensitive handling.
repository_path="$(printf '%s' "${repository_path}" | tr '[:upper:]' '[:lower:]')"
image_tag="$(printf '%s' "${image_tag}" | tr '[:upper:]' '[:lower:]')"
ecr_type="$(printf '%s' "${ecr_type}" | tr '[:upper:]' '[:lower:]')"
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lowercasing CHAINLINK_IMAGE_TAG can change the resolved image reference (Docker/ECR tags are case-sensitive and may legitimately contain uppercase). Consider only normalizing ECR_TYPE (and possibly AWS_REGION/repo path), while keeping the tag as provided (after trimming), or explicitly validating/enforcing lowercase tags with a clear error instead of silently transforming them.

Copilot uses AI. Check for mistakes.
Comment on lines 55 to 64
test_full_image_tag() {
TESTS_RUN=$((TESTS_RUN + 1))
run_script \
"CHAINLINK_FULL_IMAGE=public.ecr.aws/chainlink/chainlink:2.0.0"
assert_eq "${RUN_STATUS}" "0" "full image with tag exits 0"
assert_eq "${RUN_STDOUT}" "public.ecr.aws/chainlink/chainlink:2.0.0" "full image is returned to stdout"
assert_eq "${RUN_STDERR}" "" "full image success does not write stderr"
}

test_full_image_digest() {
TESTS_RUN=$((TESTS_RUN + 1))
run_script \
"CHAINLINK_FULL_IMAGE=public.ecr.aws/chainlink/chainlink@sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
assert_eq "${RUN_STATUS}" "0" "full image with digest exits 0"
assert_eq "${RUN_STDOUT}" "public.ecr.aws/chainlink/chainlink@sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "digest image is returned to stdout"
"ECR_TYPE=public" \
"CHAINLINK_IMAGE_REPO_PATH=chainlink" \
"CHAINLINK_IMAGE_TAG=v2.1.0"
assert_eq "${RUN_STATUS}" "0" "public ecr exits 0"
assert_eq "${RUN_STDOUT}" "public.ecr.aws/chainlink:v2.1.0" "public image is returned to stdout"
assert_eq "${RUN_STDERR}" "" "public ecr success does not write stderr"
}
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test_full_image_tag no longer exercises "full image" handling (it tests public ECR resolution via repo path + tag). Renaming this test (and updating the main() call) would make failures easier to interpret and better reflect the current resolver behavior.

Copilot uses AI. Check for mistakes.
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 9, 2026
@Tofel Tofel added this pull request to the merge queue Apr 9, 2026
Merged via the queue into develop with commit a33b629 Apr 9, 2026
139 checks passed
@Tofel Tofel deleted the dx-3581-system-tests-public-image-revamp branch April 9, 2026 11:01
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.

4 participants