Repository navigation
version-doi: poll for async publish completion (#751) - #50
Merged
Merged
Conversation
Enqueue /webhooks/publish-version-doi (202 central / 200 legacy), then poll /webhooks/version-doi-status with capped exponential backoff until ready/failed, bounded by the 15-min job cap. Replaces the single 60s synchronous curl that timed out deterministically for high-file-count datasets (on005385 3265 files, on005752 11000 files). Handles legacy synchronous 200 + skipped short-circuits.
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.
Summary
Companion to nemarOrg/nemar-cli#758 (epic nemarOrg/nemar-cli#749, Phase 2 / #751).
Rewrites the "Publish version DOI" step of
run-version-doi.yml. Instead of onecurl --max-time 60POST (which timed out deterministically for high-file-count datasets), it:POST /webhooks/publish-version-doi(fast;--max-time 30, 3 attempts, 4xx terminal). Handles all three server responses:202 {accepted:true}— central async flow → poll for completion.200 {version_doi}— legacy synchronous flow (prod before the central-flow flip) → done, no poll.200 {skipped:true}— no concept DOI / non-semver → skip.GET /webhooks/version-doi-statuswith capped exponential backoff (5s→30s), bounded well inside the 15-min job cap, until themanifest_jobsrow reachesready(published) orfailed.trigger-archive/trigger-recordskeepneeds: publish-doi, so they only fire once the version is truly published.DO NOT MERGE until the Worker is live on prod
The poll hits
GET /webhooks/version-doi-status, which only exists once nemarOrg/nemar-cli#758 is deployed to prod. Merging earlier would 404 the poll. Draft until then.Test plan
yaml.safe_load).MANIFEST_VIA_CENTRAL_WORKFLOWflip.