Skip to content

optimize: integration test speedups - #23399

Closed
kalverra wants to merge 9 commits into
developfrom
DX-4514/integration-test-tweaks
Closed

optimize: integration test speedups#23399
kalverra wants to merge 9 commits into
developfrom
DX-4514/integration-test-tweaks

Conversation

@kalverra

@kalverra kalverra commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Continued in #23408

@github-actions

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adjust CI workflow orchestration and test selection/bucketing for CRE integration tests; a small quoting mistake can break the pipeline.

This PR aims to speed up CRE integration/E2E workflows by reducing redundant setup work and precomputing/passing test matrices to cut runner startup overhead.

Changes:

  • Precompute the CRE smoke test matrix in integration-tests.yml and pass it into the reusable CRE system tests workflow.
  • Reduce repeated Go setup steps in CRE workflows to better align with precompiled test binaries.
  • Bucket CRE regression tests into fewer jobs by running multiple tests via regex patterns.

Areas requiring scrupulous human review:

  • Matrix generation and passing across workflows (quoting/escaping and output limits for JSON strings).
  • Regression bucketing patterns (-run regex) to ensure all intended tests are still executed and no unintended ones are matched/skipped.
  • Assumptions after removing explicit Go setup (availability/compatibility of go tool test2json and fallback “build from scratch” paths).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/integration-tests.yml Adds CRE matrix generation in the setup job and forwards it to downstream CRE workflows.
.github/workflows/cre-system-tests.yaml Accepts an optional precomputed test matrix and skips recomputation when provided; removes explicit Go setup.
.github/workflows/cre-regression-system-tests.yaml Buckets regression tests into fewer runners using -run regex patterns; removes explicit Go setup.
.github/workflows/cre-mixed-env-tests.yaml Removes explicit Go setup to rely on precompiled binaries.
.github/AGENTS.md Documents a workflow convention for writing outputs via tee -a "$GITHUB_OUTPUT".

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/cre-system-tests.yaml Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/integration-tests.yml
@trunk-io

trunk-io Bot commented Aug 13, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@kalverra
kalverra force-pushed the DX-4514/integration-test-tweaks branch from 37eafba to 7e736de Compare August 13, 2026 15:46
@kalverra
kalverra requested a lite review from Copilot August 13, 2026 15:51
@kalverra
kalverra marked this pull request as ready for review August 13, 2026 15:56
@kalverra
kalverra requested review from a team as code owners August 13, 2026 15:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.

Suppressed comments (3)

system-tests/tests/smoke/cre/vault_don_test_helpers.go:1555

  • The require.Eventually condition calls require.NoError and uses sendVaultRequestToGateway, which itself requires on request errors. Any transient gateway unavailability will fail the test immediately instead of letting Eventually retry, undermining the purpose of the wait and potentially adding flakiness.
	require.Eventually(t, func() bool {
		uniqueRequestID := uuid.New().String()
		getPublicKeyRequest := jsonrpc.Request[vault_helpers.GetPublicKeyRequest]{
			Version: jsonrpc.JsonRpcVersion,
			ID:      uniqueRequestID,

system-tests/lib/cre/workflow/compile.go:125

  • compileGoWorkflow now unconditionally writes timing information to stderr. Since this is a library helper used by system tests, always emitting to stderr can make logs noisier and can interfere with callers that rely on stderr for errors only.
func compileGoWorkflow(ctx context.Context, workflowFilePath, workflowName, outputDir string) (string, error) {
	workflowWasmPath := filepath.Join(outputDir, workflowName+".wasm")
	compileStart := time.Now()

	compileCmd := exec.CommandContext(ctx, "go", "build", "-o", workflowWasmPath, filepath.Base(workflowFilePath)) // #nosec G204 -- we control the value of the cmd so the lint/sec error is a false positive
	compileCmd.Dir = filepath.Dir(workflowFilePath)
	compileCmd.Env = append(os.Environ(), "CGO_ENABLED=0", "GOOS=wasip1", "GOARCH=wasm")
	if output, err := compileCmd.CombinedOutput(); err != nil {
		fmt.Fprint(os.Stderr, string(output))
		return "", errors.Wrap(err, "failed to compile workflow")
	}
	fmt.Fprintf(os.Stderr, "compileGoWorkflow: %s took %s\n", workflowName, time.Since(compileStart))

.github/workflows/integration-tests.yml:233

  • This workflow no longer depends on the removed enforce-ctf-version job (and there are no remaining ctf-check-mod-version usages in .github/workflows). The PR description doesn't mention dropping this enforcement; please confirm it's intentional or reintroduce an equivalent guard elsewhere.
  build-chainlink:
    name: Build Chainlink Image ${{ matrix.image.name }}
    if: github.actor != 'dependabot[bot]'
    environment:
      # http://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/control-deployments#using-environments-without-deployments
      name: integration
      deployment: false
    runs-on: ${{ matrix.image.runner }}
    needs: [labels, changes]
    permissions:

@cl-sonarqube-production

Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
2 New Blocker Issues (required ≤ 0)
E Security Rating on New Code (required ≥ A)

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE SonarQube for IDE

@kalverra

Copy link
Copy Markdown
Collaborator Author

Continued at #23408

@kalverra kalverra closed this Aug 13, 2026
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.

2 participants