Repository navigation
Publish request: --wait for BIDS validation, and say a pending refusal is recorded - #1652
Conversation
Right after an upload, 'nemar dataset publish request' is refused with
block_reason bids_validation_pending ('BIDS validation has not run yet') or
bids_validation_in_progress. The request IS recorded as blocked and a daily
sweep clears it once CI is green, but the CLI exited 1 with only
're-request publication', so scripted uploads (the iEEG campaign lanes)
wrapped the command in their own retry loops.
- Without --wait: a CI-pending refusal says the request is recorded and
re-checked automatically, and names '--wait' and 'nemar dataset ci <id>'.
- --wait [minutes] (default 30, max 24 h) re-requests every minute while,
and only while, CI has not concluded; a validation failure or any other
refusal is reported at once. Re-requesting updates the one blocked row
server-side; admins are notified only when the request is accepted.
|
Thank you for this change and for the clear write-up of the problem in #1646. It is merged into the integration branch for epic #1671 as PR #1678, with your commit kept (b420d4c on that branch, authored by you). The design changed in review, so this PR is closed in favor of that one. What changed: the server already records a CI-pending request and a sweep continues it, so the client-side The epic merges into |
Problem
#1646: right after an upload,
nemar dataset publish requestis refused withbids_validation_pendingorbids_validation_in_progress. The backend records the request as blocked and the daily sweep (#428) clears it once CI passes, but the CLI printed only "re-request publication" and exited 1, so scripted uploads wrapped the command in their own retry loops.Change
--wait, a CI-pending refusal says the request is recorded and re-checked automatically once validation passes, and names--waitandnemar dataset ci <id>. Exit code stays 1.--wait [minutes](default 30, max 24 h) re-requests every 60 s while, and only while, CI has not concluded, and succeeds when the request is accepted. A validation failure or any other refusal is reported at once.publication.ts); admins are emailed only on acceptance, so the loop does not spam them.No backend change.
Closes #1646
Testing
test/publish-request-wait.test.ts(new, 9 tests): only the two CI-not-concluded reasons count;--waitparsing (absent, bare, numeric; garbage is an error); retries while pending then returns the accepted request; a validation failure is thrown at once; gives up after the wait with the last refusal; and through the CLI, the hint on a CI-pending refusal and a bad--waitrefused before any request.5 files that import the changed modules: 79 pass, 0 fail (on current
dev).bun run typecheck,biome checkon the changed files.CI
api-testandintegration-devfail on this PR because it comes from a fork: both call the dev API with theTEST_*_API_KEYsecrets, which GitHub does not pass to fork pull requests, so the authenticated cases fail and the unauthenticated ones pass.lint,unit-pureande2e-sandboxrun normally.