Cover force-push-with-lease rejection path in finalize_translations_local and add concurrency group for add-submodules.yml master push#43
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds force-with-lease support detection and rejection diagnostics in the translation push flow, expands git test fixtures to simulate concurrent remote updates and unsupported Git behavior, adds three integration tests for those paths, and adds concurrency to the add-submodules workflow. Changesforce-with-lease safety and test coverage
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/assets/lib.sh:
- Around line 215-217: The version hint in the git push capability check is
misleading: the `git_push_supports_force_with_lease` path currently reports a
minimum of 2.8+ even though `--force-with-lease` exists since 1.8.5. Update the
`phase_err` message in the `git_push_supports_force_with_lease` check to remove
the hardcoded 2.8+ floor or replace it with the actual minimum version you want
to support, keeping the guidance consistent with the feature check.
- Around line 219-224: The rejected push path in the push helper is being
short-circuited by errexit, so the diagnostics after `git push
--force-with-lease` never run. Update the push handling in `assets/lib.sh`
around the `git -C "$dir" push --force-with-lease origin "$branch"` flow to use
an `if`/`else` or temporarily disable `-e` for that command, then preserve the
existing `push_rc`, `ls-remote`, and `phase_err` reporting in the failure
branch.
In `@tests/test_lib.bats`:
- Around line 311-330: The test in finalize_translations_local leaves the git
wrapper and fixture state behind if an assertion fails, which can contaminate
later cases. Move the cleanup for restore_git_push_pre_hook and
cleanup_git_fixture_root into a teardown() helper or register a trap immediately
after install_git_push_pre_hook in the affected tests so cleanup always runs,
even on early failure. Apply the same pattern to the other
finalize_translations_local test blocks referenced in this file.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 7a70796b-b9d7-4cbc-adc0-356df29022b6
📒 Files selected for processing (4)
.github/workflows/add-submodules.yml.github/workflows/assets/lib.shtests/helpers/git_fixtures.bashtests/test_lib.bats
Close #36, close #38.
Summary by CodeRabbit
Bug Fixes
Tests
Chores