fix: treat rejected push to forc.pub-index as failure - #105
Conversation
PR SummaryHigh Risk Overview Git push handling: libgit2 can return success even when the remote rejects a ref update; rejections are now surfaced via Publish retry loop: CI: Documents why Tests: Mock git builder scenarios cover transient push failures, max-attempt exhaustion, and non-retried auth failures. Reviewed by Cursor Bugbot for commit 6304725. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
👍 |
## Changes This PR bumps `merkle` and `upgradability` to version `0.26.3`. This new version does not bring any code changes. It is done just to be able to get a new version properly published on `forc.pub`. The previous version, `0.26.2`, of both libraries was not properly published because of the `forc.pub` concurrency issue fixed in FuelLabs/forc.pub#105.
This PR fixes the issue of "phantom versions", the package versions visible on
forc.pubbut not existing onforc.pub-index. One such example is, e.g., themerklev0.26.2.The reason for existence of "phantom versions" were race conditions caused by publishing scripts running from the
sway-standardsandsway-libsrepositories.libgit2'spushreturnsOkeven when the server rejects a ref update (a non-fast-forward because a concurrent publish advanced the branch). The rejection is only reported through the callback, so a non-emptystatusmust be turned into a hard error.Without this, a dropped push looks like success and the caller records the package version in the database while the index commit never landed, which causes the "phantom versions" we currently have.
The PR:
pushtoforc.pub-indexa small number of times.Note that instead of retires we could have a single-writer coordination on
forc.pub. This requires a more complex implementation, and since we expect congestion to be very rare, the error reporting + retries is acceptable as a solution, at least for the time being.Additionally, the PR removes the unused "Install forc for tests" CI step. The step is not used by any other steps and was failing in installing/compiling the old v0.65.0 version of
forcdue to yanked dependencies.