Skip to content

fix(ci): force build integ test images on pushes to develop#21726

Open
erikburt wants to merge 1 commit intodevelopfrom
fix/push-events-force-integ-test-image-build
Open

fix(ci): force build integ test images on pushes to develop#21726
erikburt wants to merge 1 commit intodevelopfrom
fix/push-events-force-integ-test-image-build

Conversation

@erikburt
Copy link
Collaborator

Ensure we build integ tests images on pushes to develop, to populate docker layer cache.

@erikburt erikburt self-assigned this Mar 26, 2026
@erikburt erikburt added the run-e2e-tests Use on your PR to run E2E tests before the merge queue label Mar 26, 2026
@github-actions
Copy link
Contributor

✅ No conflicts with other open PRs targeting develop

@trunk-io
Copy link

trunk-io bot commented Mar 26, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@erikburt erikburt requested a review from kalverra March 26, 2026 21:43
@erikburt erikburt marked this pull request as ready for review March 26, 2026 21:44
@erikburt erikburt requested a review from a team as a code owner March 26, 2026 21:44
Copilot AI review requested due to automatic review settings March 26, 2026 21:44
@erikburt erikburt requested review from a team as code owners March 26, 2026 21:44
Copy link
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 — modifies CI control flow for building/pushing integration-test Docker images on push events to develop, which can impact CI cost and reliability.

This PR updates the Integration Tests workflow so that Chainlink integration test images are force-built on pushes to develop to help populate Docker layer cache.

Changes:

  • Rename the matrix boolean from should-build to any-should-run and route build gating through a dedicated “explain” step output (build-image).
  • Force image builds on push events to the develop branch (regardless of whether tests will run / whether the image already exists).
  • Update downstream steps to use steps.explain.outputs.build-image for conditional checkout/build.

if [[ "${EVENT_NAME}" == "push" && "${REF_NAME}" == "develop" ]]; then
echo "We force build on pushes to develop to populate the docker layer cache."
echo "build-image=true" | tee -a "$GITHUB_OUTPUT"
elif [[ "${ANY_SHOULD_RUN}" == "true" && "${IMAGE_EXISTS}" == "false" ]]; then
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

The IMAGE_EXISTS check is stricter than the prior logic. steps.check-image-exists.outputs.exists is commonly compared as != 'true' (treating empty/unknown as not-existing), but here the script only builds when IMAGE_EXISTS == 'false'. If the action ever returns an empty string or another falsy value, this will incorrectly skip builds. Consider changing the condition to build when IMAGE_EXISTS != 'true' (and/or normalizing the value before the comparison).

Suggested change
elif [[ "${ANY_SHOULD_RUN}" == "true" && "${IMAGE_EXISTS}" == "false" ]]; then
elif [[ "${ANY_SHOULD_RUN}" == "true" && "${IMAGE_EXISTS}" != "true" ]]; then

Copilot uses AI. Check for mistakes.
echo "We will build the image because the matrix's any-should-run is true and the image does not already exist in ECR."
echo "any-should-run is true when:"
echo " - For the non-plugins image: the core tests, ccip tests, or solana tests will be run."
echo " - For the plugins image: the core cre e2e tests will be run."
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

The explanation text for any-should-run doesn't match the actual matrix condition. In the matrix, any-should-run for the (plugins) image is true when core/ccip/solana/cre setups request runs, but the message says it is only true when core CRE e2e tests will be run. This can mislead debugging; either adjust the message to match the condition or narrow the plugins matrix condition to what the message states.

Suggested change
echo " - For the plugins image: the core cre e2e tests will be run."
echo " - For the plugins image: the core tests, ccip tests, solana tests, or core cre e2e tests will be run."

Copilot uses AI. Check for mistakes.
Comment on lines +266 to +269
if [[ "${EVENT_NAME}" == "push" && "${REF_NAME}" == "develop" ]]; then
echo "We force build on pushes to develop to populate the docker layer cache."
echo "build-image=true" | tee -a "$GITHUB_OUTPUT"
elif [[ "${ANY_SHOULD_RUN}" == "true" && "${IMAGE_EXISTS}" == "false" ]]; then
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

On push to develop you force a rebuild, but you still run the ECR existence check first. Since the result is ignored in that branch, consider skipping Check if image exists in ECR for that event/branch to save AWS API calls and a bit of job time (e.g., gate the step with an if or move the force-build decision ahead of the check).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-e2e-tests Use on your PR to run E2E tests before the merge queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants