Skip to content

feat: per-study delete versions and duplicate-upload pre-flight - #2

Closed
JoshuaHarris391 wants to merge 2 commits into
fix/version-idempotency-prod-safetyfrom
feat/per-study-versions
Closed

feat: per-study delete versions and duplicate-upload pre-flight#2
JoshuaHarris391 wants to merge 2 commits into
fix/version-idempotency-prod-safetyfrom
feat/per-study-versions

Conversation

@JoshuaHarris391

Copy link
Copy Markdown
Collaborator

Stacked on #1. Two capabilities from the acdc learnings ledger:

  • Per-study name:version specs for delete metadata — one job can retire different versions per study (--studies "ausdiab:0.7.5,cdah:0.8.1"). Uniform versions canonicalise back to the legacy argv so newer CLIs stay compatible with older installed service scripts; a trailing colon is rejected, the whole list validates before dispatch, and one all anywhere forces the confirmation prompt even with --yes. New bash-driven tests pin the worker routing with a stubbed python3.
  • Duplicate-upload pre-flight — the upload worker now refuses (exit 2) when the audit table already records the same project + version + endpoint, since re-running an additive upload silently doubles the records; --force-reupload is the deliberate override.

Known pre-existing limitation (unchanged): a remote --on ec2 delete containing all re-prompts on the box and aborts — same behaviour as before this PR.

324 tests pass.

Release ladders diverge per study in practice, which with one global
--version meant one job per study, each with its own confirmation and
failure log. Each --studies entry may now be written name:version, with
--version as the default for bare entries. Design notes carried from
the reference implementation:

- partition(':') so a trailing colon is rejected, never silently
  defaulted; the whole list validates before anything dispatches
- uniform versions canonicalise back to the legacy '--studies a,b
  --version X' argv, keeping newer CLIs compatible with older installed
  service scripts
- one 'all' anywhere in the list forces the prompt even with --yes
- the failure log records the version, since one job can now delete two
  versions of the same study

The shell wrapper parses both shapes into parallel arrays, keeps the
exit-3 skip semantics, and picks the worker per study. New bash-driven
tests pin the routing with a stubbed python3.
metadata upload is purely additive: re-running one silently doubles the
project's records at that version — observed live as an audit table
holding exactly 2x the per-run row count for several study/version
pairs. Before submitting, the worker asks the audit table whether this
project + version + endpoint has already been uploaded and refuses with
exit 2 if so, naming --force-reupload as the deliberate override. A
missing audit table is a first run, not an error. The flag threads
through metadata upload, upload-all and the bulk wrapper.
@JoshuaHarris391
JoshuaHarris391 deleted the branch fix/version-idempotency-prod-safety August 5, 2026 02:45
@JoshuaHarris391
JoshuaHarris391 deleted the feat/per-study-versions branch August 5, 2026 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant