Skip to content

ci: consolidate improvements — paths, validate-pr action, fetch-depth, continue-on-error#2047

Merged
KRRT7 merged 17 commits into
mainfrom
ci/fix-matrix-name
Apr 9, 2026
Merged

ci: consolidate improvements — paths, validate-pr action, fetch-depth, continue-on-error#2047
KRRT7 merged 17 commits into
mainfrom
ci/fix-matrix-name

Conversation

@KRRT7
Copy link
Copy Markdown
Contributor

@KRRT7 KRRT7 commented Apr 9, 2026

Summary

Batch of CI improvements to the consolidated ci.yaml:

  • Remove codeflash-java-runtime/ from unit_tests detection — Java runtime changes are validated by e2e-java, not unit tests
  • Narrow e2e flag from codeflash/ to explicit Python subdirs — excludes languages/java/ and languages/javascript/ which have their own E2E jobs
  • Narrow tests/ in e2e_java/e2e_js to tests/scripts/end_to_end_test_java* / ..._js* — avoids triggering language E2Es on unrelated test changes
  • Extract Validate PR into composite action (.github/actions/validate-pr/action.yml) — single source of truth, was duplicated 3× across E2E jobs
  • fetch-depth: 1 for unit-tests and type-check — these jobs don't need git history, saves checkout time
  • Remove continue-on-error: true from unit-tests — was silently masking real failures in the matrix
  • git add -u instead of git add -A in prek — only stages modified tracked files, won't accidentally commit untracked files
  • Remove name: ${{ matrix.name }} from matrix jobs — prevents literal matrix.name in GitHub UI when jobs are skipped
  • Remove JDK 11 + Maven from unit-tests — only 5/3943 tests reference Java, all have skip_if_maven_not_available() guards

Test plan

  • Verify workflow-only PR skips all jobs correctly (gate reports "skipped")
  • Verify code PR triggers appropriate jobs based on changed paths
  • Verify composite validate-pr action works on E2E jobs

When matrix jobs are skipped, `${{ matrix.name }}` is never expanded,
showing literal "matrix.name" in the checks UI. Removing the `name:`
field lets GitHub use the job ID when skipped and auto-expand matrix
values when running.
@github-actions github-actions Bot added the workflow-modified This PR modifies GitHub Actions workflows label Apr 9, 2026
Only 5 of 3,943 unit tests need Java, and they already have
skip_if_maven_not_available() guards. Java execution is validated
by the e2e-java job. Saves ~30-60s per matrix entry (7 entries).
@KRRT7 KRRT7 changed the title ci: fix 'matrix.name' showing in skipped checks ci: fix skipped check display + remove unnecessary JDK from unit-tests Apr 9, 2026
Run ruff check --fix and ruff format before prek validation.
If files were modified, commit and push the fixes automatically.
@KRRT7 KRRT7 changed the title ci: fix skipped check display + remove unnecessary JDK from unit-tests ci: fix matrix names, remove JDK from unit-tests, auto-format in prek Apr 9, 2026
KRRT7 added 3 commits April 9, 2026 11:52
Expand e2e_java and e2e_js change detection to include shared pipeline
code (optimization/, verification/, languages/base.py) but decouple
from the broad e2e flag. A change to codeflash/version.py now only
triggers Python E2Es, not Java/JS E2Es.
- Remove codeflash-java-runtime/ from unit_tests change detection
- Narrow e2e flag from codeflash/ to explicit Python subdirs (excludes java/, javascript/)
- Narrow tests/ in e2e_java/e2e_js to specific test scripts
- Extract duplicated Validate PR step into composite action
- Use fetch-depth: 1 for unit-tests and type-check (no git history needed)
- Remove continue-on-error: true from unit-tests (was masking real failures)
- Change git add -A to git add -u in prek auto-fix (won't stage untracked files)
@KRRT7 KRRT7 changed the title ci: fix matrix names, remove JDK from unit-tests, auto-format in prek ci: consolidate improvements — paths, validate-pr action, fetch-depth, continue-on-error Apr 9, 2026
@KRRT7 KRRT7 had a problem deploying to external-trusted-contributors April 9, 2026 17:03 — with GitHub Actions Error
@KRRT7 KRRT7 had a problem deploying to external-trusted-contributors April 9, 2026 17:03 — with GitHub Actions Error
@KRRT7 KRRT7 had a problem deploying to external-trusted-contributors April 9, 2026 17:03 — with GitHub Actions Error
@KRRT7 KRRT7 had a problem deploying to external-trusted-contributors April 9, 2026 17:03 — with GitHub Actions Error
@KRRT7 KRRT7 had a problem deploying to external-trusted-contributors April 9, 2026 17:03 — with GitHub Actions Error
@KRRT7 KRRT7 had a problem deploying to external-trusted-contributors April 9, 2026 17:03 — with GitHub Actions Error
@KRRT7 KRRT7 had a problem deploying to external-trusted-contributors April 9, 2026 17:03 — with GitHub Actions Error
@KRRT7 KRRT7 had a problem deploying to external-trusted-contributors April 9, 2026 17:03 — with GitHub Actions Error
@KRRT7 KRRT7 had a problem deploying to external-trusted-contributors April 9, 2026 17:03 — with GitHub Actions Error
@KRRT7 KRRT7 had a problem deploying to external-trusted-contributors April 9, 2026 17:03 — with GitHub Actions Error
@KRRT7 KRRT7 had a problem deploying to external-trusted-contributors April 9, 2026 17:03 — with GitHub Actions Error
@KRRT7 KRRT7 had a problem deploying to external-trusted-contributors April 9, 2026 17:03 — with GitHub Actions Error
@KRRT7 KRRT7 had a problem deploying to external-trusted-contributors April 9, 2026 17:03 — with GitHub Actions Error
@KRRT7 KRRT7 had a problem deploying to external-trusted-contributors April 9, 2026 17:03 — with GitHub Actions Error
@KRRT7 KRRT7 had a problem deploying to external-trusted-contributors April 9, 2026 17:03 — with GitHub Actions Error
github-actions Bot and others added 4 commits April 9, 2026 17:03
The requires_java marker only checked for java binary but the tests
also need mvn to build the codeflash-runtime JAR. These 13 tests
were silently failing in unit-tests (masked by continue-on-error).
Ubuntu runners have Java/Maven pre-installed, so checking for java/mvn
binaries doesn't skip. The actual dependency is the codeflash-runtime
JAR which must be built from codeflash-java-runtime/ via Maven.
github-actions Bot and others added 6 commits April 9, 2026 17:20
Same fix as test_comparator.py — uses _find_comparator_jar() to skip
when the codeflash-runtime JAR isn't built. Fixes Windows unit-tests
which don't have Java pre-installed (unlike Linux runners).
Apply @requires_java_runtime to TestJavaRunAndParseBehavior and
TestJavaRunAndParsePerformance at the class level. The performance
test was failing on Windows with a flaky 10ms timing assertion
(10.515ms actual, 5% tolerance) — pre-existing issue masked by
continue-on-error.
@KRRT7 KRRT7 merged commit 61f468a into main Apr 9, 2026
17 of 28 checks passed
@KRRT7 KRRT7 deleted the ci/fix-matrix-name branch April 9, 2026 23:12
@KRRT7 KRRT7 mentioned this pull request Apr 9, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

workflow-modified This PR modifies GitHub Actions workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant