Skip to content

[ci-coach] Remove unnecessary test dependency from canary_go job #13921

@github-actions

Description

@github-actions

Summary

Removes the unnecessary test job dependency from the canary_go job. The canary job downloads test artifacts but doesn't need to wait for the unit test job to complete before starting.

Optimization

Remove Test Dependency from Canary Job

Type: Job Dependency Optimization
Impact: ~2-3 minutes per run
Risk: Very Low
Changes:

  • Line 393: Removed test from needs: [test, integration]needs: [integration]

Current Flow:

lint ─┬─→ test ────┐
      │            ├─→ canary_go
      └─→ integration ┘
``````

**Proposed Flow:**
``````
lint ─┬─→ test
      │
      └─→ integration ─→ canary_go

Rationale:
The canary_go job's purpose is to verify test coverage by downloading artifacts from both unit and integration tests. GitHub Actions' download-artifact action fetches artifacts by name regardless of job dependencies - it only requires that the artifacts exist. Since both test and integration jobs upload their artifacts independently (test-result-unit and test-result-integration-*), the canary job will successfully download both sets of artifacts even without an explicit dependency on test.

By removing this dependency:

  • Canary starts as soon as integration finishes (instead of waiting for both test and integration)
  • In cases where test finishes after integration (~2-3 min typical), canary starts earlier
  • No functionality impact - artifacts are still available via download-artifact

Expected Impact

  • Time Savings: ~2-3 minutes per run when test job outlasts integration
  • Risk Level: Very Low - artifacts are uploaded independently and remain available
  • Functionality: No change - canary still downloads and analyzes both unit and integration test results

Validation Results

✅ All validations passed:

  • YAML syntax: python3 -c "import yaml; yaml.safe_load(...)" - passed
  • Change is minimal: 1 line modified
  • Comment added explaining the change

Testing Plan

  • Verify YAML syntax is valid
  • Monitor canary job on next CI run
  • Confirm artifacts are still downloaded successfully
  • Validate test coverage analysis still works

Analysis Context

This optimization was identified by the CI Coach workflow (run #69) after analyzing 100 recent CI runs. The analysis found:

Current CI Health:

  • ✅ Test coverage: 100% (20,004/20,004 tests executed)
  • ✅ Integration matrix well-balanced (31 groups)
  • ✅ Proper caching and parallelization
  • ⚠️ Only issue: unnecessary job dependency

Why This Change:
The CI workflow is already well-optimized. This is the only clear low-risk optimization identified. Other potential improvements (reducing matrix size, cache optimization) have higher risk or lower impact.

Metrics Baseline:

  • Success rate (last 100 runs): 44% (includes cancelled/failed PRs)
  • Integration matrix: 31 groups
  • Test coverage: 100%

Analysis performed by CI Coach workflow run §69

AI generated by CI Optimization Coach

  • expires on Feb 7, 2026, 1:39 PM UTC

Note

This was originally intended as a pull request, but the git push operation failed.

Workflow Run: View run details and download patch artifact

The patch file is available in the agent-artifacts artifact in the workflow run linked above.

To apply the patch locally:

# Download the artifact from the workflow run https://github.com/github/gh-aw/actions/runs/21713303397
# (Use GitHub MCP tools if gh CLI is not available)
gh run download 21713303397 -n agent-artifacts

# The patch file will be at agent-artifacts/tmp/gh-aw/aw.patch after download
# Apply the patch
git am agent-artifacts/tmp/gh-aw/aw.patch
Show patch (37 lines)
From 645ea5b120c66a2cf0f8cf1daaddf369bc57f178 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Thu, 5 Feb 2026 13:37:02 +0000
Subject: [PATCH] ci: remove unnecessary test dependency from canary_go job

The canary_go job verifies test coverage by collecting artifacts from both
unit and integration test jobs. However, it doesn't need to wait for the
test job to complete - it only needs the artifacts, which are uploaded
independently.

Benefits:
- Removes unnecessary dependency
- Canary can start as soon as integration finishes
- No functionality impact - artifacts still available via download-artifact

This is a minimal optimization with very low risk.
---
 .github/workflows/ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index bd0789b..8b55b33 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -390,7 +390,7 @@ jobs:
 
   canary_go:
     runs-on: ubuntu-latest
-    needs: [test, integration]
+    needs: [integration]  # Removed test dependency - artifacts available independently
     if: always()  # Run even if some tests fail to report coverage
     permissions:
       contents: read
-- 
2.52.0

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions