Skip to content

fix(ci): wire CODECOV_TOKEN to coverage uploads (Phase 2)#4666

Merged
Yicong-Huang merged 2 commits into
apache:mainfrom
Yicong-Huang:fix/codecov-upload-token
May 2, 2026
Merged

fix(ci): wire CODECOV_TOKEN to coverage uploads (Phase 2)#4666
Yicong-Huang merged 2 commits into
apache:mainfrom
Yicong-Huang:fix/codecov-upload-token

Conversation

@Yicong-Huang
Copy link
Copy Markdown
Contributor

@Yicong-Huang Yicong-Huang commented May 2, 2026

What changes were proposed in this PR?

Phase 2 of #4645. Pass token: ${{ secrets.CODECOV_TOKEN }} to all four codecov/codecov-action invocations in .github/workflows/build.yml (frontend, scala, python, agent-service).

       - name: Upload <stack> coverage to Codecov
         uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5.5.4
         with:
+          token: ${{ secrets.CODECOV_TOKEN }}
           files: ...
           flags: <stack>
           fail_ci_if_error: false

The token has been added as a repo secret. Phase 1 deferred this on the assumption that the tokenless flow was sufficient; in practice Codecov rejects tokenless uploads on protected default branches ({"message":"Token required because branch is protected"}), which has been silent because fail_ci_if_error: false.

Any related issues, documentation, discussions?

Closes #4665. Follow-up to #4645.

How was this PR tested?

Will be verified post-merge: a new commit on main should appear at https://app.codecov.io/gh/apache/texera/branch/main with a coverage report (currently 404 — no main commit has ever produced a report).

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

Generated-by: Claude Code (Opus 4.7, 1M context)

Codecov's tokenless flow only authenticates fork PRs. Push events on
the protected default branch get rejected with "Token required because
branch is protected", which has been silent because fail_ci_if_error
is false — result: zero reports on apache:main.

Closes apache#4665.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added fix ci changes related to CI labels 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@9a8214d). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4666   +/-   ##
=======================================
  Coverage        ?   46.75%           
  Complexity      ?     2065           
=======================================
  Files           ?     1013           
  Lines           ?    39571           
  Branches        ?     3852           
=======================================
  Hits            ?    18500           
  Misses          ?    20285           
  Partials        ?      786           
Flag Coverage Δ
agent-service 28.73% <ø> (?)
frontend 34.97% <ø> (?)
python 85.18% <ø> (?)
scala 38.49% <ø> (?)

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.

@Yicong-Huang Yicong-Huang changed the title fix(ci): pass CODECOV_TOKEN to coverage uploads fix(ci): wire CODECOV_TOKEN to coverage uploads (Phase 2 of #4645) May 2, 2026
@Yicong-Huang Yicong-Huang requested a review from aglinxinyuan May 2, 2026 08:06
@Yicong-Huang Yicong-Huang added the release/v1.1.0-incubating back porting to release/v1.1.0-incubating label May 2, 2026
@Yicong-Huang Yicong-Huang enabled auto-merge (squash) May 2, 2026 08:06
@Yicong-Huang Yicong-Huang changed the title fix(ci): wire CODECOV_TOKEN to coverage uploads (Phase 2 of #4645) fix(ci): wire CODECOV_TOKEN to coverage uploads (Phase 2) 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!

@Yicong-Huang Yicong-Huang merged commit 1780287 into apache:main May 2, 2026
26 checks passed
github-actions Bot pushed a commit that referenced this pull request May 2, 2026
…4666)

### What changes were proposed in this PR?

Phase 2 of #4645. Pass `token: ${{ secrets.CODECOV_TOKEN }}` to all four
`codecov/codecov-action` invocations in `.github/workflows/build.yml`
(frontend, scala, python, agent-service).

```diff
       - name: Upload <stack> coverage to Codecov
         uses: codecov/codecov-action@75cd116 # v5.5.4
         with:
+          token: ${{ secrets.CODECOV_TOKEN }}
           files: ...
           flags: <stack>
           fail_ci_if_error: false
```

The token has been added as a repo secret. Phase 1 deferred this on the
assumption that the tokenless flow was sufficient; in practice Codecov
rejects tokenless uploads on protected default branches
(`{"message":"Token required because branch is protected"}`), which has
been silent because `fail_ci_if_error: false`.

### Any related issues, documentation, discussions?

Closes #4665. Follow-up to #4645.

### How was this PR tested?

Will be verified post-merge: a new commit on `main` should appear at
https://app.codecov.io/gh/apache/texera/branch/main with a coverage
report (currently 404 — no main commit has ever produced a report).

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

Generated-by: Claude Code (Opus 4.7, 1M context)

Co-authored-by: Yicong Huang <yiconghuang@cs.umass.edu>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

(backported from commit 1780287)
Yicong-Huang added a commit that referenced this pull request May 3, 2026
### What changes were proposed in this PR?

Add a Codecov coverage badge to the existing `<p align="center">` stats
block in `README.md`. The badge links to
https://app.codecov.io/gh/apache/texera so reviewers / contributors can
see the current overall coverage and click through to the per-flag
breakdown without leaving the repo home page.

```diff
   <img alt="Static Badge" src="https://img.shields.io/badge/Largest_Deployment-100_nodes,_400_cores-green">
+  <a href="https://app.codecov.io/gh/apache/texera"><img alt="Coverage" src="https://img.shields.io/codecov/c/github/apache/texera/main?logo=codecov&label=coverage"></a>
 </p>
```

Why now: PR #4666 wired `CODECOV_TOKEN` so push events on `main` and
`release/**` now upload coverage. The latest few main commits at
`https://codecov.io/api/v2/github/apache/repos/texera/branches/main` are
reporting `46%` overall (frontend / scala / python / agent-service flags
broken out). Without the badge, every "what's the current coverage?"
question is a manual hop to the Codecov dashboard.

Style note: shields.io to match the neighboring `Static Badge` images.
Linked so a click jumps straight to the dashboard (the existing badges
are images-only).

### Any related issues, documentation, discussions?

Closes #4713. Related: #4666 (Phase 2 token wiring), #4645 (Phase 1
tokenless wiring).

### How was this PR tested?

This is a one-line README change; rendered the new line in the GitHub
markdown preview locally. The badge URL is already producing a
non-`unknown` value (the dashboard returns `46%` for the latest main
commits), so the rendered badge will be a real number on first view, not
the placeholder.

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

Generated-by: Claude Code (Opus 4.7, 1M context)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Yicong-Huang added a commit that referenced this pull request May 3, 2026
### What changes were proposed in this PR?

Add a Codecov coverage badge to the existing `<p align="center">` stats
block in `README.md`. The badge links to
https://app.codecov.io/gh/apache/texera so reviewers / contributors can
see the current overall coverage and click through to the per-flag
breakdown without leaving the repo home page.

```diff
   <img alt="Static Badge" src="https://img.shields.io/badge/Largest_Deployment-100_nodes,_400_cores-green">
+  <a href="https://app.codecov.io/gh/apache/texera"><img alt="Coverage" src="https://img.shields.io/codecov/c/github/apache/texera/main?logo=codecov&label=coverage"></a>
 </p>
```

Why now: PR #4666 wired `CODECOV_TOKEN` so push events on `main` and
`release/**` now upload coverage. The latest few main commits at
`https://codecov.io/api/v2/github/apache/repos/texera/branches/main` are
reporting `46%` overall (frontend / scala / python / agent-service flags
broken out). Without the badge, every "what's the current coverage?"
question is a manual hop to the Codecov dashboard.

Style note: shields.io to match the neighboring `Static Badge` images.
Linked so a click jumps straight to the dashboard (the existing badges
are images-only).

### Any related issues, documentation, discussions?

Closes #4713. Related: #4666 (Phase 2 token wiring), #4645 (Phase 1
tokenless wiring).

### How was this PR tested?

This is a one-line README change; rendered the new line in the GitHub
markdown preview locally. The badge URL is already producing a
non-`unknown` value (the dashboard returns `46%` for the latest main
commits), so the rendered badge will be a real number on first view, not
the placeholder.

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

Generated-by: Claude Code (Opus 4.7, 1M context)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

(backported from commit 09715e1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci changes related to CI fix release/v1.1.0-incubating back porting to release/v1.1.0-incubating

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wire Build stacks to Codecov (Phase 2: tokened uploads + main reports)

3 participants