Refactor e2e test execution scripts#12452
Open
caseydavenport wants to merge 5 commits intoprojectcalico:masterfrom
Open
Refactor e2e test execution scripts#12452caseydavenport wants to merge 5 commits intoprojectcalico:masterfrom
caseydavenport wants to merge 5 commits intoprojectcalico:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Calico’s Semaphore end-to-end (e2e) CI execution to consistently run the in-repo e2e test binaries, and refactors the main “standard” job script into smaller phase scripts for readability and reuse.
Changes:
- Switches the GCP e2e job configuration from
K8S_E2E_FLAGS/RUN_LOCAL_TESTSto config-driven selection viaE2E_TEST_CONFIG. - Refactors
.semaphore/end-to-end/scripts/body_standard.shinto composable phase scripts underscripts/phases/. - Adds Makefile targets (
e2e-run,e2e-run-cnp) to run e2e tests against an explicitKUBECONFIG, with configurable output/report paths.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
e2e/config/gcp-bpf.yaml |
Makes GCP BPF test selection fully config-driven (no extends). |
Makefile |
Adds e2e-run/e2e-run-cnp targets and parameterizes report output. |
.semaphore/semaphore.yml.d/blocks/20-e2e-gcp.yml |
Updates the GCP e2e block to provide E2E_TEST_CONFIG instead of label-filter flags. |
.semaphore/semaphore.yml |
Regenerates the compiled Semaphore pipeline to match the block changes. |
.semaphore/semaphore-scheduled-builds.yml |
Applies the same env var changes for scheduled runs. |
.semaphore/end-to-end/scripts/phases/*.sh |
Introduces phase scripts for provision/install/configure/migrate/test/hcp flows. |
.semaphore/end-to-end/scripts/body_standard.sh |
Converts the monolithic standard e2e flow into phase dispatch. |
.semaphore/end-to-end/scripts/body_flannel-migration.sh |
Reuses the new provisioning phase and improves inline documentation/formatting. |
.semaphore/end-to-end/scripts/README.md |
Documents the phase model and how to run phases locally. |
coutinhop
reviewed
Apr 13, 2026
caseydavenport
commented
Apr 15, 2026
caseydavenport
commented
Apr 15, 2026
caseydavenport
commented
Apr 15, 2026
caseydavenport
commented
Apr 15, 2026
caseydavenport
commented
Apr 15, 2026
lwr20
reviewed
Apr 16, 2026
Fail fast with a clear error message when required environment variables are missing, rather than letting scripts blow up with cryptic errors downstream. Also fix migrate.sh to capture stderr in the bz upgrade log (|& instead of |) for consistency with the other phases.
Add || exit to pushd/popd in run_tests_local.sh (SC2164), and replace single-item for loop with a direct check in configure.sh (SC2043).
9e15245 to
9b8ca3e
Compare
9b8ca3e to
e5a3a13
Compare
Replace run_tests_local.sh with run_tests.sh that supports three modes: 1. RUN_LOCAL_TESTS set: build from local source (per-PR CI) 2. TEST_TYPE == k8s-e2e: download pre-built binary from hashrelease (scheduled CI) 3. Otherwise: fall back to bz tests (benchmarks, certification, etc.) This consolidates the work from projectcalico#12507 into the phase-script structure, and addresses lwr20's review feedback about bz tests handling non-e2e test types. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
e5a3a13 to
9f05407
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors
body_standard.shinto smaller composable phase scripts, and reworks how e2e binaries are sourced:RUN_LOCAL_TESTS): builds the e2e binary from sourceTEST_TYPE=k8s-e2e): downloads the e2e binary from the latest hashreleasebz testsAlso adds an
e2e-runMakefile target and switches GCP e2e tests to use a config file instead of inline flags.Supersedes #12507.