Repository navigation
Conversation
Recording coverage on main raced when two merges landed close together: each run checked out its own triggering commit, both appended to the end of coverage/history.csv, and git pull --rebase conflicted. Every bot commit on main also marked all open pull requests out of date under strict branch protection. The history now lives on the coverage-history branch, checked out after the concurrency wait. push_coverage_history.sh retries a rejected push by resetting to the branch tip, re-applying our rows with a new merge subcommand and re-rendering COVERAGE.md. The first run creates the branch, seeded from the last version of coverage/ in main's history, so coverage/ is removed from main here. Mirrors googlemaps/android-maps-compose#1006. Only unit coverage is recorded.
Contributor
Code Coverage
|
…ranch # Conflicts: # coverage/COVERAGE.md # coverage/history.csv
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.
Today #1812 and #1814 merged 16 seconds apart and the second coverage run failed (https://github.com/googlemaps/android-maps-utils/actions/runs/37806329462). Each run checked out its own triggering commit, so the second one started from a stale
coverage/history.csv. Both appended rows at the end of the same files, andgit pull --rebase origin mainconflicted. Separately, every bot commit onmainmarks all open pull requests out of date under strict branch protection.This mirrors googlemaps/android-maps-compose#1006. The history now lives on a
coverage-historybranch, checked out intocoverage-data/after the concurrency wait, andmainis never written to. The new.github/scripts/push_coverage_history.shhandles a rejected push by resetting to the branch tip, re-applying our rows with a newcoverage_history.py mergesubcommand (keyed on commit, suite and module), re-renderingCOVERAGE.mdand pushing again, up to 3 attempts. The CSV columns are unchanged.First run: the
coverage-historybranch does not exist yet, so the workflow checks outmainwith full history, finds the last version ofcoverage/history.csvandcoverage/COVERAGE.md(the parent of this PR's merge commit, since this PR removescoverage/frommain), and creates the branch as an orphan seeded with those files plus a short README. It then appends the row for the triggering commit and pushes the branch. Every later run checks out the existing branch. No manual step is needed, and the existing 21 commits of history carry over.Only the
unitsuite (Kover) is recorded, as before. There is no coverage badge in this repo, so none is added. The self-trigger guard forchore: update coverage historyis gone, since nothing lands onmainanymore; the release-please guard stays.AGENTS.mdnow points at the branch.Tested locally against a copy of the current
history.csv: the seed step picked up all 126 existing rows from git history aftercoverage/was deleted, the first push created the branch, and two simulated runs appending different commits from the same tip both landed (the second push was rejected, merged and retried). YAML parses, andbash -nandshellcheckpass on the script and on everyrun:block.