Skip to content

ci: publish e2e/scenario test images to the duckgres-prs ECR repo - #1021

Merged
Piccirello merged 1 commit into
mainfrom
ecr-prs-split-test-images
Jul 31, 2026
Merged

ci: publish e2e/scenario test images to the duckgres-prs ECR repo#1021
Piccirello merged 1 commit into
mainfrom
ecr-prs-split-test-images

Conversation

@Piccirello

Copy link
Copy Markdown
Member

Moves the e2e/scenario test images out of the prod duckgres ECR repo and into a dedicated duckgres-prs repo, using a dedicated any-ref publish role instead of the shared org-secret one.

Why

e2e-mw-dev.yml and scenario-dev.yml currently push pr-<n>-<sha> / scenario-runner-<run_id>-<attempt> / scenario-duckgres-<run_id>-<attempt> into the prod duckgres repo (via the reusable _image-build.yml). That is why the prod repo has to keep a mutable pr-* carve-out, and it means PR builds can write to a production image repo. These are also the last two workflows still using the shared github-posthog-ecr-publish-role.

What changes

Three call sites of _image-build.yml:

  • image-name: duckgresduckgres-prs
  • ecr-role: ${{ secrets.AWS_ECR_PUBLISH_IAM_ROLE }}${{ vars.AWS_ECR_PRS_PUBLISH_IAM_ROLE }}

_image-build.yml itself is unchanged (already parameterised), and it is called only by these two workflows — the four container-image-*-cd.yml prod pushers authenticate inline and are untouched.

Downstream jobs consume needs.<job>.outputs.image (the full registry URL), so the new repo propagates automatically. The mw-dev cluster can pull duckgres-prs — the -prs repos get the same cross-account read policy as the prod ones.

Depends on

posthog-cloud-infra#9715 (creates duckgres-prs + github-duckgres-prs-publish-role) applied, and the repo variable AWS_ECR_PRS_PUBLISH_IAM_ROLE set. Merging before that will fail to assume the role.

Once this lands, a follow-up infra PR flips the prod duckgres repo to fully immutable (dropping exclusions = ["pr-*"]).

e2e-mw-dev and scenario-dev push their test images (pr-<n>-<sha>,
scenario-runner-<run_id>-<attempt>, scenario-duckgres-<run_id>-<attempt>) into
the PROD duckgres ECR repo, which is why that repo has to keep a mutable pr-*
carve-out. Point them at the dedicated duckgres-prs repo instead, via the
any-ref github-duckgres-prs-publish-role (repo variable
AWS_ECR_PRS_PUBLISH_IAM_ROLE) rather than the shared org-secret role.

Downstream jobs consume needs.<job>.outputs.image (the full registry URL), so
the retarget propagates without further changes. The mw-dev cluster can pull
duckgres-prs: the -prs repos get the same cross-account read policy.

Requires the duckgres-prs repo + role from posthog-cloud-infra#9715 to be
applied, and the AWS_ECR_PRS_PUBLISH_IAM_ROLE variable set, before merging.
@github-actions

Copy link
Copy Markdown

Test Impact Plan

Deterministic summary of how this PR changes tests, CI runners, and coverage-risk signals.

Summary

Area Added Changed Deleted
Test files 0 0 0
E2E/journey files 0 0 0
Workflow files 0 2 0

Signals

  • Test cases: +0 / -0
  • Assertions: +0 / -0
  • Skips or known failures added: 0
  • Workflow continue-on-error added: 0
  • Workflow path filters added: 0
  • Test commands removed from justfile: 0
  • E2E/journey retry lines added: 0

Coverage risk: neutral or increased

No coverage-reduction warnings detected.

@Piccirello
Piccirello marked this pull request as ready for review July 31, 2026 21:28
@Piccirello
Piccirello merged commit 7a6daa5 into main Jul 31, 2026
35 of 37 checks passed
@Piccirello
Piccirello deleted the ecr-prs-split-test-images branch July 31, 2026 21:57
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.

1 participant