Skip to content

fix(log): handle invalid test/series IDs without uncaught ValueError#1072

Open
SAY-5 wants to merge 1 commit into
hpc:developfrom
SAY-5:fix/log-bad-test-id
Open

fix(log): handle invalid test/series IDs without uncaught ValueError#1072
SAY-5 wants to merge 1 commit into
hpc:developfrom
SAY-5:fix/log-bad-test-id

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 12, 2026

Code review checklist:

  • Code is generally sensical and well commented
  • Variable/function names all telegraph their purpose and contents
  • Functions/classes have useful doc strings
  • Function arguments are typed
  • Added/modified unit tests to cover changes.
  • New features have documentation added to the docs.
  • New features and backwards compatibility breaks are noted in the RELEASE.md

Fixes #1064.

When pav log <subcmd> <id> is passed an id that is neither a valid TestID nor a valid SeriesID, LogCommand.run falls through to SeriesID(args.id), whose constructor raises an uncaught ValueError and crashes the CLI.

This guards the conversion with SeriesID.is_valid_id and prints a readable error before returning 1, matching how the other "load failed" paths in this command already behave. Adds a regression test.

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.

Uncaught ValueError when passing bad test IDs to pav log

1 participant