Skip to content

fix(ci): generate the coverage files Codecov uploads expect#4649

Merged
Yicong-Huang merged 4 commits into
apache:mainfrom
Yicong-Huang:fix/codecov-report-paths
May 2, 2026
Merged

fix(ci): generate the coverage files Codecov uploads expect#4649
Yicong-Huang merged 4 commits into
apache:mainfrom
Yicong-Huang:fix/codecov-report-paths

Conversation

@Yicong-Huang
Copy link
Copy Markdown
Contributor

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

Phase 1 (apache#4646) wired the upload steps but the underlying tools
were not configured to actually write the report files Codecov
looks for, so the scala and frontend uploads landed at "0 coverage
files to report" and only python and agent-service flags reached
Codecov.

frontend/karma.conf.js:
- Add 'coverage' to the explicit reporters list. Without it, ng's
  --code-coverage flag does not pull in the karma-coverage reporter
  because the user-supplied reporters override Angular's defaults.
- Add an explicit coverageReporter writing lcovonly to
  frontend/coverage/lcov.info (the path the Codecov upload step
  globs).

build.sbt:
- Set ThisBuild / jacocoReportSettings to enable the XML formatter
  alongside the default HTML so sbt-jacoco emits jacoco.xml under
  each module's target/scala-2.13/jacoco/report/ (the path the
  Codecov upload step globs).

Follow-up to apache#4646 / apache#4645.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added dependencies Pull requests that update a dependency file fix frontend Changes related to the frontend GUI labels May 2, 2026
@Yicong-Huang Yicong-Huang added the release/v1.1.0-incubating back porting to release/v1.1.0-incubating label May 2, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@d3d17b0). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4649   +/-   ##
=======================================
  Coverage        ?   37.20%           
  Complexity      ?     2072           
=======================================
  Files           ?      836           
  Lines           ?    27775           
  Branches        ?     3852           
=======================================
  Hits            ?    10335           
  Misses          ?    16655           
  Partials        ?      785           
Flag Coverage Δ
frontend 34.97% <ø> (?)
scala 38.55% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

The previous commit used class names that do not exist in sbt-jacoco
3.5.0 (`ScalaHTMLReport`, `XMLReport`) and scoped the setting to
`ThisBuild`, which the plugin's project-scoped default overrides.

Use the published `JacocoReportFormats.ScalaHTML` / `.XML` constants
and bundle the override into `asfLicensingSettings` so every module
picks it up, producing `target/scala-2.13/jacoco/report/jacoco.xml`
for the Codecov upload glob.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot removed the engine label May 2, 2026
Yicong-Huang added a commit that referenced this pull request May 2, 2026
…ks run (#4654)

### What changes were proposed in this PR?

Close `.github/labeler.yml` gaps where root-level / workflow-adjacent
config files matched no rule that maps to a CI stack:

**Scala build / lint config → `service` label** (so the scala stack
runs):

- `build.sbt` (root)
- `project/**` (sbt build sources, `plugins.sbt`)
- `.scalafix.conf` (moved to root by #3888)
- `.scalafmt.conf`

Today these match either `**/build.sbt` (label `dependencies`, which
`LABEL_STACKS` from #4640 maps to no-op) or no rule at all. A PR that
only edits one of them skipped the scala stack — concrete example: PR
#4649, labels `dependencies, fix, frontend, release/v1.1.0-incubating`,
union `{frontend}`, no scala. `service` already maps to scala in
`LABEL_STACKS`, so the union picks up scala automatically.

**Workflow-adjacent / repo-wide config → `ci` label** (so the full
matrix runs):

- `.github/scripts/**` (CI helper scripts)
- `.github/labeler.yml` (the labeler config itself)
- `.asf.yaml` (branch protection rulesets, mailing list, GitHub
features)

These currently match no rule. `ci` already maps to all four stacks,
which is the right gate for changes that can affect every stack.

### Any related issues, documentation, discussions?

Closes #4653.

### How was this PR tested?

This PR's own labeler run picks up `ci` (it edits
`.github/labeler.yml`), so all stacks gate the change. After merge,
future PRs that only edit a root scala build file pick up `service`, and
PRs editing `.github/scripts/**`, `.github/labeler.yml`, or `.asf.yaml`
pick up `ci`.

### 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
…ks run (#4654)

### What changes were proposed in this PR?

Close `.github/labeler.yml` gaps where root-level / workflow-adjacent
config files matched no rule that maps to a CI stack:

**Scala build / lint config → `service` label** (so the scala stack
runs):

- `build.sbt` (root)
- `project/**` (sbt build sources, `plugins.sbt`)
- `.scalafix.conf` (moved to root by #3888)
- `.scalafmt.conf`

Today these match either `**/build.sbt` (label `dependencies`, which
`LABEL_STACKS` from #4640 maps to no-op) or no rule at all. A PR that
only edits one of them skipped the scala stack — concrete example: PR
#4649, labels `dependencies, fix, frontend, release/v1.1.0-incubating`,
union `{frontend}`, no scala. `service` already maps to scala in
`LABEL_STACKS`, so the union picks up scala automatically.

**Workflow-adjacent / repo-wide config → `ci` label** (so the full
matrix runs):

- `.github/scripts/**` (CI helper scripts)
- `.github/labeler.yml` (the labeler config itself)
- `.asf.yaml` (branch protection rulesets, mailing list, GitHub
features)

These currently match no rule. `ci` already maps to all four stacks,
which is the right gate for changes that can affect every stack.

### Any related issues, documentation, discussions?

Closes #4653.

### How was this PR tested?

This PR's own labeler run picks up `ci` (it edits
`.github/labeler.yml`), so all stacks gate the change. After merge,
future PRs that only edit a root scala build file pick up `service`, and
PRs editing `.github/scripts/**`, `.github/labeler.yml`, or `.asf.yaml`
pick up `ci`.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Opus 4.7

(backported from commit 5c7dac8)
@Yicong-Huang Yicong-Huang enabled auto-merge (squash) May 2, 2026 07:23
@github-actions github-actions Bot added service and removed engine labels May 2, 2026
Copy link
Copy Markdown
Contributor

@aglinxinyuan aglinxinyuan left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment thread build.sbt
@Yicong-Huang Yicong-Huang merged commit 69f3aea into apache:main May 2, 2026
18 checks passed
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file fix frontend Changes related to the frontend GUI release/v1.1.0-incubating back porting to release/v1.1.0-incubating service

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants