Repository navigation
release: upload only the docs for a version that hex.pm lists - #102
Merged
Merged
Conversation
A re-run of the publish job after a failed docs upload ran mix hex.publish again. Once an owner approved the staged release, Hex refused the package upload without --replace and skipped the docs, so the version stayed without docs.
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.
Before
RELEASE.mdtells the owner how to recover a failed publish job:The re-run runs the same command as the first run:
mix hex.publish --yes 2>&1 | tee "$RUNNER_TEMP/publish.log"Problem
When the docs upload fails, the release still waits on hex.pm without docs, and the job turns red (#101). Once an owner approves that release, a re-run uploads the package again. hex.pm refuses it with
must include the --replace flag to update an existing release, and Hex then skips the docs. The version stays on Hex without docs, and the job stays red on every re-run.After
The step asks hex.pm whether it lists the version. If it does, the step runs
mix hex.publish docs --yes, and the docs wait for approval like a release. If it doesn't, the step runsmix hex.publish --yesas before. A re-run is now the one recovery, before and after the approval.mix hex.publish --yesDetails
The publish job came with #98, and #101 made it fail on
Publishing docs failedand pointed the owner to a re-run. In Hex 2.7.0,Mix.Tasks.Hex.Publish.create/3uploads the docs only after the package upload succeeds. On hex.pm,Hexpm.Repository.Release.update/7rejects a second upload of a version without--replace, andStagedReleases.stage_docs/5accepts docs for a staged or a published version. Before the approval, hex.pm answers 404 for a staged version, so a re-run uploads the package again, and Hex replaces the staged release with one that has docs.Any answer other than 200 or 404 fails the step, so the job never guesses which upload Hex needs.
The repo has no test for its workflows. A throwaway harness ran the step from
origin/mainand from this branch with a fakemixthat answers like Hex 2.7.0, and with the real hex.pm answer for 0.7.0 (200) and 9.9.9 (404). It gave the table above. zizmor 1.32.0--persona=pedanticpasses.The same change goes to the other repos of this release design: rubas/cloaked_req, rubas/exmpeg, rubas/kagi_ex, and rubas/whisper_ct2.