Repository navigation
Conversation
Motivation: The bash script built SQL and ssh command lines by string interpolation, which is hard to test and easy to break. Design Choices: Options keep the old environment variable names via typer envvar so existing cron invocations keep working. Job IDs are sent with openqa_client instead of shelling out to openqa-cli, reusing the shared client config and retries. Benefits: Importable module with 100% statement and branch coverage, ruff and ty clean without broad file level exclusions, and faster startup than the previous shell implementation.
Martchus
approved these changes
Oct 9, 2026
plusky
reviewed
Oct 9, 2026
plusky
left a comment
There was a problem hiding this comment.
dry_run=1 used to echo the command, but the note is now log.info, invisible at default WARNING: without -v nothing prints, contradicting "Only print what would be done". Log at warning level or document -v.
Also, ssh/psql stderr is now swallowed: capture_output=True keeps it in err.stderr, but the handler only logs the exception, so auth/SQL errors vanish where bash printed them. Log err.stderr before exiting.
Parity otherwise verified: identical SQL, batching, JOB_IDS parsing, scheme default, 24 tests pass, ruff clean.
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.
Motivation:
The bash script built SQL and ssh command lines by string
interpolation, which is hard to test and easy to break.
Design Choices:
Options keep the old environment variable names via typer envvar
so existing cron invocations keep working. Job IDs are sent with
openqa_client instead of shelling out to openqa-cli, reusing the
shared client config and retries.
Benefits:
Importable module with 100% statement and branch coverage, ruff
and ty clean without broad file level exclusions, and faster
startup than the previous shell implementation.