[DX-4553] Optimize Integration Tests Workflow#23164
Conversation
|
✅ No conflicts with other open PRs targeting |
CORA - Analysis SkippedReason: The number of code owners (4) is less than the minimum required (5) and/or the number of CODEOWNERS entries with changed files (3) is less than the minimum required (2). |
There was a problem hiding this comment.
Pull request overview
Risk Rating: MEDIUM (significant CI/workflow orchestration changes that can block integration coverage if misconfigured)
This PR aims to reduce CI runtime/cost for integration/system tests by parallelizing CCIP reorg tests, adding a host-side compilation step with Go build caching, and enabling reuse of a prebuilt chainlink binary in Docker builds.
Changes:
- Add
USE_PREBUILTsupport in Chainlink Dockerfiles to copy a host-built./bin/chainlinkinto the image instead of rebuilding. - Restructure integration test workflows: add a
compile-testsjob, adjust runner sizing, and update path-based change detection (including a newccip-changesoutput). - Split CCIP reorg tests into per-lane matrix entries and tune runner resources in
.github/e2e-tests.yml.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| plugins/chainlink.Dockerfile | Adds USE_PREBUILT build arg to optionally copy a prebuilt binary into the image. |
| core/chainlink.Dockerfile | Same USE_PREBUILT optimization for the core image build. |
| .gitignore | Generalizes trial-log ignores and re-organizes ignored AI agent settings files. |
| .github/workflows/run-nightly-in-memory-integration-tests.yml | Switches reusable workflow reference to run-e2e-tests/v1. |
| .github/workflows/integration-tests.yml | Adds ccip-changes, introduces compile-tests, updates runner sizing, and changes job dependency structure. |
| .github/workflows/integration-in-memory-tests.yml | Switches reusable workflow reference to run-e2e-tests/v1. |
| .github/workflows/cre-system-tests.yaml | Adds per-test runner sizing and migrates Go setup to ctf-setup-go with build caching. |
| .github/workflows/cre-regression-system-tests.yaml | Same as above for CRE regression tests. |
| .github/workflows/ccip-chaos-tests.yml | Switches reusable workflow reference to run-e2e-tests/v1. |
| .github/e2e-tests.yml | Splits CCIP reorg tests into OnSource/OnDest entries and adjusts runner sizing/triggers. |
| .github/actions/setup-go/action.yml | Bumps actions/setup-go usage from v6 to v7. |
| .github/.agents/skills/right-size-runners/SKILL.md | Removes the old skill definition. |
| .github/.agents/skills/right-size-runners/scripts/test_workflow_compare.py | Removes old test file (skill migration/cleanup). |
| .github/.agents/skills/optimize-workflow/SKILL.md | Adds new workflow-optimization skill documentation. |
| .github/.agents/skills/optimize-workflow/scripts/workflow_monitor.py | Updates monitor script to write structured per-trial output (json/md/logs) and adds runtime/outlier analysis. |
| .github/.agents/skills/optimize-workflow/scripts/workflow_compare.py | Updates compare script to resolve trials by name/path and write comparison output under the workflow’s trials directory. |
| .github/.agents/skills/optimize-workflow/scripts/test_workflow_monitor.py | Extends tests for new monitor behavior/output layout and helper functions. |
| .github/.agents/skills/optimize-workflow/scripts/test_workflow_compare.py | Adds tests for new trial resolution and comparison output behavior. |
Comments suppressed due to low confidence (1)
.github/e2e-tests.yml:19
- These newly split CCIP reorg entries don’t include the
Merge Queue E2E CCIP v1.6 Teststrigger. Sinceintegration-tests.ymlsetstest_triggertoMerge Queue E2E CCIP v1.6 Testsformerge_group, these tests will never run in the merge queue (only Nightly/Push/Dispatch).
If the intent is to keep reorg coverage in merge queue, add that trigger to these entries (and the other split reorg entries).
triggers:
- Nightly E2E Tests
- Push E2E CCIP v1.6 Tests
- Workflow Dispatch E2E CCIP v1.6 Tests
erikburt
left a comment
There was a problem hiding this comment.
LGTM - happy to approve if you think my comment on caching is an unnecessary optimization / adds more complexity than it's worth.
- Replace legacy .github/e2e-tests.yml + ctf-run-tests with ccip-system-tests.yaml - Static 8-test matrix, precompiled binaries, direct gotestsum execution - Use QA_AWS_ROLE_TO_ASSUME for ECR pull access - Use precompiled cre-env binary in chip_ingress_stack_provider + before_suite - Bump chip ingress timeout 2m -> 5m - Drop citool, k8s/in-memory paths, slack, GAP, otel, coverage, pyroscope - Delete .github/e2e-tests.yml
85d08d5 to
2e2e143
Compare
…optimizeIntegrationTests
|
| binaryPath := filepath.Join(relativePathToRepoRoot, "system-tests", "tests", "bin", creEnvBinaryName) | ||
| if _, err := os.Stat(binaryPath); err == nil { | ||
| framework.L.Info().Str("binary", binaryPath).Msg("Using precompiled cre-env binary") | ||
| cmd := exec.CommandContext(ctx, binaryPath, args...) | ||
| cmd.Dir = environmentDir | ||
| return cmd | ||
| } |
| wait "$p1"; p1_exit=$? | ||
| wait "$p2"; p2_exit=$? | ||
| wait "$p3"; p3_exit=$? | ||
| if [[ "$p1_exit" -ne 0 || "$p2_exit" -ne 0 || "$p3_exit" -ne 0 ]]; then | ||
| echo "Compilation failed (cre-smoke=$p1_exit, cre-regression=$p2_exit, cre-env=$p3_exit)" >&2 | ||
| exit 1 | ||
| fi |
| if tt.createBinary { | ||
| binDir := filepath.Join(tmpDir, "system-tests", "tests", "bin") | ||
| require.NoError(t, os.MkdirAll(binDir, 0700)) | ||
| binPath := filepath.Join(binDir, "cre-env") | ||
| require.NoError(t, os.WriteFile(binPath, []byte("#!/bin/sh\necho ok"), 0600)) | ||
| } | ||
|
|
||
| cmd := resolveCreEnvCommand(ctx, tmpDir, environmentDir, tt.inputArgs...) | ||
| require.NotNil(t, cmd) | ||
|
|
||
| assert.Equal(t, environmentDir, cmd.Dir) | ||
| if tt.createBinary { | ||
| assert.True(t, filepath.IsAbs(cmd.Path) || filepath.Base(cmd.Path) == "cre-env", "path should be cre-env binary: %s", cmd.Path) | ||
| } else { | ||
| assert.Equal(t, "go", filepath.Base(cmd.Path)) | ||
| } |




Integration Tests Simplification and Optimization
Integration Testsis our primary bottleneck in CI for PRs. This PR addresses some of the structural issues holding it back, along with smaller optimizations to improve speed and cost.Big Changes
run-e2e-testsmonolith action. It's now rebuilt in a more minimal fashion.Small Changes
Results
Before Shape
After Shape