contrueCT opened a new pull request, #3169:
URL: https://github.com/apache/hugegraph/pull/3169
## Purpose of the PR
- close #3168
HugeGraph still uses `codecov/codecov-action@v3` for Commons,
PD/Store/HStore, and Server coverage uploads. Fork pull requests cannot
access
`CODECOV_TOKEN`, so v3 falls back to the legacy anonymous uploader. That
uploader shares a global rate limit: HTTP 429 failures were observed on #3167
and #3161, while the uploader still exited with status 0 and left Codecov
with
only a subset of the expected reports.
This PR modernizes the upload boundary only. It does not change JaCoCo
collection, aggregation, coverage thresholds, or production code. The
PD/Store report aggregation work remains independent in #3160 and #3161.
## Main Changes
- Upgrade all five repository coverage uploads from
`codecov/codecov-action@v3` to `@v5`.
- Pass the existing `CODECOV_TOKEN` for trusted push and same-repository
runs.
On fork pull requests the secret remains unavailable by design, and v5 uses
its fork-aware tokenless upload path.
- Replace the deprecated `file` input with `files` in every upload step.
- Add a repository-wide configuration contract that rejects legacy Codecov
actions, missing `files` inputs, missing trusted-run token inputs, removed
expected uploads, and newly added legacy upload steps.
- Keep Codecov transport errors non-blocking in this PR; this change does not
add `fail_ci_if_error: true`.
## Verifying these changes
- [ ] Trivial rework / code cleanup without any test coverage. (No Need)
- [ ] Already covered by existing tests, such as *(please modify tests
here)*.
- [x] Need tests and can be verified as follows:
- `bash
hugegraph-server/hugegraph-dist/src/assembly/travis/test-codecov-upload-config.sh`
- Parse the three changed workflows with SnakeYAML 1.33.
- `mvn -q apache-rat:check -N -ntp`
- `mvn editorconfig:check -pl hugegraph-server/hugegraph-dist -am -ntp`
- `git diff --check`
- The contract failed against the pre-change v3 configuration and passed
after all five upload steps were migrated.
- Mutation checks verified that it rejects a legacy upload in a newly
added workflow and does not mistake `env.token` for `with.token`.
The external upload result is intentionally left to this PR's GitHub Actions
run, which exercises the v5 fork-aware tokenless path that cannot be
reproduced
as a local Codecov upload.
## Does this PR potentially affect the following parts?
- [ ] Dependencies ([add/update
license](https://hugegraph.apache.org/docs/contribution-guidelines/contribute/#321-check-licenses)
info &
[regenerate_known_dependencies.sh](../install-dist/scripts/dependency/regenerate_known_dependencies.sh))
- [x] Modify configurations
- [ ] The public API
- [x] Other affects (Codecov coverage upload transport and authentication)
- [ ] Nope
## Documentation Status
- [ ] `Doc - TODO`
- [ ] `Doc - Done`
- [x] `Doc - No Need`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]