Skip to content

fix: return failure status when time-series loads fail - #279

Merged
krowvin merged 1 commit into
mainfrom
fix/timeseries-load-exit-status
Sep 28, 2026
Merged

krowvin merged 1 commit into
mainfrom
fix/timeseries-load-exit-status

Conversation

@krowvin

@krowvin krowvin commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

A time-series copy can report failed stores and still exit 0, causing AWS Batch to mark the job successful. Raise a ClickException with the original error as its cause instead of printing the error and continuing to the completion message. Existing fatal-service error handling remains intact.

Observed during September 28, 2026 MVP Batch Events testing: a load into dev used an unencrypted internal HTTP CDA_API_ROOT, matched 147 series, and reported three failed stores, but Batch received exit code 0. The HTTP connection-pool warning is addressed separately in cwms-python #312; this companion change fixes the CLI process status.

Validation: 38 related loader and CLI error-handling tests passed on Python 3.14. Regression cases demonstrate that both read and aggregate write failures previously exited 0 and now exit 1 while retaining the failure text. Successful, empty-data, and dry-run commands still exit 0. Black, isort, and git diff --check passed. No patched Batch run or live CDA writes were performed; the dev container was unavailable locally.

@krowvin
krowvin requested a review from Enovotny as a code owner September 28, 2026 22:01
@krowvin
krowvin merged commit fbcb1d2 into main Sep 28, 2026
12 checks passed
@krowvin
krowvin deleted the fix/timeseries-load-exit-status branch September 28, 2026 22:03
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