Repository navigation
Conversation
A new workflow runs after the build of a PR and, when the build uploaded coverage (Linux, a head commit message with "with-coverage"), posts or updates one comment: the coverage of the PR's changed lines, the totals against the newest main build its change starts from, the changed lines that no test ran, and the packages whose coverage changed. `coverpack -compare` computes it from the packed files of the two builds and git, reading the PR's files as untrusted data. The workflow runs from the default branch, so fork PRs get the comment too. with-coverage Co-authored-by: Isaac <no-reply@databricks.com>
From a review: - decode rejects blocks past the end of their file, bitmaps and profiles that the bytes left cannot hold, and checks the block count before allocating; compare walks only the changed lines of a block, and the job has a 15 minute timeout; - the script lists the artifacts through the API (plain names, under 16 MB, at most 8), fails when a listing or download fails, and takes as the base only a build with the same cells; - cell names are plain words in backticks; the diff is read hunk by hunk, so a changed line that looks like a header is not taken for one; - the package table lists only packages the PR changes, and the comment says how many commits of main the base build is behind. with-coverage Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
✅ Integration test reportCommit: 2b35cb2
Top 3 slowest tests (at least 2 minutes):
|
This branch has not been deployed
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.
Changes
A new workflow,
coverage-comment.yml, runs after thebuildworkflow of a PR. It acts only when that build uploaded coverage: on Linux, for a PR whose head commit message haswith-coverage. It then posts one comment on the PR, and updates the same comment on later builds. The comment shows:coverpack -comparecomputes it from the packed files of the two builds and from git:Security
workflow_run, so it runs the default branch's code and never checks out the PR.coverage-linux-<cell>names, each under 16 MB;[A-Za-z0-9_./+=-]and put in backticks, and cell names must be plain lowercase words.actions: read,contents: read,pull-requests: write, andid-token: writefor JFrog.Fork PRs get the comment too, because the token here is the base repository's.
Tests
tools/coverpack/compare_test.gocover:-compareon the artifacts of runs 44739969429 and 44746083519:bundle/configsync/permissions.gomatch-dump;.github/scripts/coverage-comment.sh(DRY_RUN=1) against run 44739969429, both without a base and with one. Its first job, looking up the open PR, was bypassed because that PR is merged.workflow_runworkflows only run from the default branch, so the first real comment comes after this merges: on the next PR withwith-coverage.This pull request and its description were written by Isaac.