feat(ci): wire Build stacks to Codecov tokenless#4646
Merged
Conversation
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
aed0c92 to
4a70f75
Compare
4a70f75 to
e4f6326
Compare
Generate per-stack coverage reports and upload them to Codecov from the Build workflow so every PR shows a coverage diff against main and main pushes refresh the baseline. Per-stack changes in build.yml: - frontend: pass --code-coverage to nx test (yarn test:ci); upload ./frontend/coverage/**/lcov.info with flag=frontend (ubuntu-latest only, to avoid duplicate uploads from the windows/macos matrix). - scala: switch backend tests to 'sbt coverage test coverageReport', which instruments compile via sbt-scoverage and emits per-module scoverage.xml; upload ./**/scoverage-report/scoverage.xml with flag=scala. New plugin in project/plugins.sbt: sbt-scoverage 2.0.12. - python: pytest --cov=. --cov-report=xml; upload coverage.xml with flag=python on the 3.12 matrix entry only. pytest-cov is installed after the LICENSE-binary pip-licenses snapshot so it does not show up in the binding license check. - agent-service: bun test --coverage --coverage-reporter=lcov; upload ./agent-service/coverage/lcov.info with flag=agent-service on the ubuntu-latest matrix entry only. Each upload uses codecov/codecov-action pinned to v5.5.4 (75cd11691c0faa626561e295848008c8a7dddffe) per the ASF GitHub Actions policy on third-party actions. Tokenless mode for Phase 1 — public repo + Codecov v5 OIDC fallback handles upload, no CODECOV_TOKEN needed yet. Phase 2 (separate task) opens an INFRA ticket for the token to enable PR comments / commit status / quality gates. Each upload step uses 'fail_ci_if_error: false' so a transient Codecov outage does not turn the Build red. Closes apache#4645 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
e4f6326 to
457a3a4
Compare
aglinxinyuan
approved these changes
May 2, 2026
Contributor
aglinxinyuan
left a comment
There was a problem hiding this comment.
LGTM! Let's ignore the frontend coverage for now. We can add more frontend test cases after replacing Karma.
github-actions Bot
pushed a commit
that referenced
this pull request
May 2, 2026
### What changes were proposed in this PR? Wire each Build stack up to Codecov so every PR and main push shows a coverage report. Phase 1: tokenless upload only — no PR comments, no status check, no quality gates yet. Per-stack changes in `build.yml`: | stack | test command change | report uploaded | |---|---|---| | frontend | `yarn test:ci --code-coverage` | `./frontend/coverage/**/lcov.info` (ubuntu only) | | scala | `sbt jacoco` (was `sbt test`) | `./**/target/scala-2.13/jacoco/report/jacoco.xml` | | python | `pytest --cov=. --cov-report=xml -sv` | `./amber/src/main/python/coverage.xml` (3.12 only) | | agent-service | `bun test --coverage --coverage-reporter=lcov` | `./agent-service/coverage/lcov.info` (ubuntu only) | `project/plugins.sbt`: add `sbt-jacoco` 3.5.0. JaCoCo works on JVM bytecode and is Scala-version-agnostic; the more idiomatic `sbt-scoverage` does not publish a `scalac-scoverage-plugin` for Scala 2.13.18 (the version Texera builds on; scoverage's last published Scala version is 2.13.16). `frontend/package.json`: add `karma-coverage` to dev dependencies. Angular's `--code-coverage` flag in the Karma builder needs the package available in `node_modules`; without it Karma fails at startup with "Found 1 load error". New `amber/dev-requirements.txt` keeps test-only Python deps (currently `pytest-cov`) separate from runtime requirements. CI installs it after the LICENSE-binary `pip-licenses` snapshot, so dev tools never show up in the binding license check or in packaging. Each upload uses `codecov/codecov-action` pinned to v5.5.4 (`75cd11691c0faa626561e295848008c8a7dddffe`) per the [ASF GitHub Actions policy](https://infra.apache.org/github-actions-policy.html) on third-party actions, and `fail_ci_if_error: false` so a transient Codecov outage does not turn the Build red. ### Any related issues, documentation, discussions? Closes #4645. Phase 2 (separate task, deferred) opens an INFRA ticket to add `CODECOV_TOKEN`, which unlocks PR diff-coverage comments, commit status, and `codecov.yml` quality-gate enforcement. Other ASF projects using this pattern: [apache/airflow](https://app.codecov.io/gh/apache/airflow/branch/main) (with self-fork [`apache/airflow-codecov-action`](https://github.com/apache/airflow-codecov-action)), [NIFI-13210](https://issues.apache.org/jira/browse/NIFI-13210), [INFRA-21474 (Superset)](https://issues.apache.org/jira/browse/INFRA-21474), [INFRA-19493](https://issues.apache.org/jira/browse/INFRA-19493). ### How was this PR tested? Will be exercised by this PR's own scala/python/frontend/agent-service matrix on CI. The first run on `main` after merge will populate the Codecov baseline; subsequent PRs auto-compare and post a diff in the dashboard at https://app.codecov.io/gh/apache/texera (after the org/repo is registered there — Codecov auto-onboards public repos on first upload). ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Opus 4.7 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> (backported from commit a0e1d22)
Yicong-Huang
added a commit
that referenced
this pull request
May 2, 2026
### What changes were proposed in this PR? Follow-up to #4646. The upload steps wired in that PR for the scala and frontend stacks have been silently uploading nothing (`Found 0 coverage files to report` in the Codecov action logs); only `python` and `agent-service` flags reach Codecov today. Reason: the underlying tools were not configured to write the report files at the paths the upload globs expected. `frontend/karma.conf.js`: - Add `"coverage"` to the explicit `reporters` list. Without this, Angular's `--code-coverage` flag cannot inject the `karma-coverage` reporter because the user-supplied `reporters` array overrides Angular's defaults. - Add an explicit `coverageReporter` block writing `lcovonly` to `frontend/coverage/lcov.info` — the path the Codecov upload step globs (`./frontend/coverage/**/lcov.info`). `build.sbt`: - Set `ThisBuild / jacocoReportSettings` to use both `ScalaHTMLReport()` and `XMLReport(encoding = "utf-8")`. By default `sbt-jacoco` emits only HTML; without XML there is nothing for Codecov to read at `<module>/target/scala-2.13/jacoco/report/jacoco.xml`. ### Any related issues, documentation, discussions? Follow-up to #4646. Original tracking issue: #4645. ### How was this PR tested? Will be exercised by this PR's own scala and frontend matrices on CI. Expected post-fix behaviour: both flags appear at https://app.codecov.io/gh/apache/texera (currently only `python` and `agent-service` are listed) and per-stack coverage shows up on PR commits. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Opus 4.7
github-actions Bot
pushed a commit
that referenced
this pull request
May 2, 2026
### What changes were proposed in this PR? Follow-up to #4646. The upload steps wired in that PR for the scala and frontend stacks have been silently uploading nothing (`Found 0 coverage files to report` in the Codecov action logs); only `python` and `agent-service` flags reach Codecov today. Reason: the underlying tools were not configured to write the report files at the paths the upload globs expected. `frontend/karma.conf.js`: - Add `"coverage"` to the explicit `reporters` list. Without this, Angular's `--code-coverage` flag cannot inject the `karma-coverage` reporter because the user-supplied `reporters` array overrides Angular's defaults. - Add an explicit `coverageReporter` block writing `lcovonly` to `frontend/coverage/lcov.info` — the path the Codecov upload step globs (`./frontend/coverage/**/lcov.info`). `build.sbt`: - Set `ThisBuild / jacocoReportSettings` to use both `ScalaHTMLReport()` and `XMLReport(encoding = "utf-8")`. By default `sbt-jacoco` emits only HTML; without XML there is nothing for Codecov to read at `<module>/target/scala-2.13/jacoco/report/jacoco.xml`. ### Any related issues, documentation, discussions? Follow-up to #4646. Original tracking issue: #4645. ### How was this PR tested? Will be exercised by this PR's own scala and frontend matrices on CI. Expected post-fix behaviour: both flags appear at https://app.codecov.io/gh/apache/texera (currently only `python` and `agent-service` are listed) and per-stack coverage shows up on PR commits. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Opus 4.7 (backported from commit 69f3aea)
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.
What changes were proposed in this PR?
Wire each Build stack up to Codecov so every PR and main push shows a coverage report. Phase 1: tokenless upload only — no PR comments, no status check, no quality gates yet.
Per-stack changes in
build.yml:yarn test:ci --code-coverage./frontend/coverage/**/lcov.info(ubuntu only)sbt jacoco(wassbt test)./**/target/scala-2.13/jacoco/report/jacoco.xmlpytest --cov=. --cov-report=xml -sv./amber/src/main/python/coverage.xml(3.12 only)bun test --coverage --coverage-reporter=lcov./agent-service/coverage/lcov.info(ubuntu only)project/plugins.sbt: addsbt-jacoco3.5.0. JaCoCo works on JVM bytecode and is Scala-version-agnostic; the more idiomaticsbt-scoveragedoes not publish ascalac-scoverage-pluginfor Scala 2.13.18 (the version Texera builds on; scoverage's last published Scala version is 2.13.16).frontend/package.json: addkarma-coverageto dev dependencies. Angular's--code-coverageflag in the Karma builder needs the package available innode_modules; without it Karma fails at startup with "Found 1 load error".New
amber/dev-requirements.txtkeeps test-only Python deps (currentlypytest-cov) separate from runtime requirements. CI installs it after the LICENSE-binarypip-licensessnapshot, so dev tools never show up in the binding license check or in packaging.Each upload uses
codecov/codecov-actionpinned to v5.5.4 (75cd11691c0faa626561e295848008c8a7dddffe) per the ASF GitHub Actions policy on third-party actions, andfail_ci_if_error: falseso a transient Codecov outage does not turn the Build red.Any related issues, documentation, discussions?
Closes #4645. Phase 2 (separate task, deferred) opens an INFRA ticket to add
CODECOV_TOKEN, which unlocks PR diff-coverage comments, commit status, andcodecov.ymlquality-gate enforcement.Other ASF projects using this pattern: apache/airflow (with self-fork
apache/airflow-codecov-action), NIFI-13210, INFRA-21474 (Superset), INFRA-19493.How was this PR tested?
Will be exercised by this PR's own scala/python/frontend/agent-service matrix on CI. The first run on
mainafter merge will populate the Codecov baseline; subsequent PRs auto-compare and post a diff in the dashboard at https://app.codecov.io/gh/apache/texera (after the org/repo is registered there — Codecov auto-onboards public repos on first upload).Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.7