Skip to content

fix(release-search): report a ValueError from a source as that source's error - #1433

Open
splitsec2 wants to merge 1 commit into
calibrain:mainfrom
splitsec2:fix/release-search-valueerror
Open

splitsec2 wants to merge 1 commit into
calibrain:mainfrom
splitsec2:fix/release-search-valueerror

Conversation

@splitsec2

@splitsec2 splitsec2 commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Kept small on purpose so it's easy to review. This is the same kind of small fix as the ones in #1429 to #1432, so see the question in #1429 about separate PRs versus combined. I'm sending them separately until I hear otherwise.

In search_source_releases the except ValueError comes before the branch that handles the operational errors, and ValueError is in that tuple. A ValueError from build_release_search_plan or source.search() is therefore reported as Unknown source: <name> instead of <name>: <message>. The only ValueError meant for that branch is the one get_source raises for a name that isn't registered, so that call now has its own try and the rest goes back to the operational errors branch.

The failure test already covered OSError and RuntimeError, so I added ValueError to it, and that case fails on current main. Ruff, basedpyright and tests/core pass.

The one red check is the existing clock-dependent test test_a_queued_torrent_asks_for_a_grace_once, which fails on any runner that booted recently. It is fixed in #1426 and is not caused by this change.

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