You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(grz-cli, grz-db): require & record QC workflow version; log grzctl runtime version (closes#532) (#561)
## Summary
Require a QC workflow version for new `populate-qc` runs (CLI flag or
env var), persist `qc_workflow_version` on Detailed QC results, and
record the `grzctl` dependency runtime versions on submission state
transitions for auditability.
## What changed
- CLI
- `populate-qc` now requires `--qc-workflow-version` and also reads
`GRZCTL_QC_WORKFLOW_VERSION`.
See
[packages/grzctl/src/grzctl/commands/db/cli.py](packages/grzctl/src/grzctl/commands/db/cli.py).
- Model / DB
- Added `qc_workflow_version` to `DetailedQCResult` (nullable column for
backward compatibility).
- Alembic migration added to create the column.
- Tests
- Updated and added tests in
[packages/grzctl/tests/cli/test_db.py](packages/grzctl/tests/cli/test_db.py):
- Updated existing `test_populate_qc` to pass `--qc-workflow-version`.
- Added tests for flag usage, env var usage, and missing-version
failure.
- Version logging
- Cache and store `grzctl` dependy runtime versions with submission
state logs so historical logs are traceable to the runtime that wrote
them.
## DB / upgrade
Run DB migrations before using the new CLI:
```bash
# Using the CLI helper
grzctl db upgrade
# or directly with alembic (repo-specific)
alembic upgrade head
```
The migration adds a nullable qc_workflow_version column so existing
rows remain NULL.
Closes#532
---------
Co-authored-by: Florian R. Hölzlwimmer <Hoeze@users.noreply.github.com>
0 commit comments