[codex] Skip invalid builds on single-version projects#12905
Draft
ericholscher wants to merge 2 commits intomainfrom
Draft
[codex] Skip invalid builds on single-version projects#12905ericholscher wants to merge 2 commits intomainfrom
ericholscher wants to merge 2 commits intomainfrom
Conversation
The build_versions_from_names function now unpacks trigger_build return value as (_, build), but existing test mocks did not set a return_value, causing unpacking errors in 12 tests.
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.
This fixes builds being triggered for non-default internal versions on single-version projects.
Single-version projects only serve the default internal version, but the build trigger path still accepted any active internal version. That made the issue in #6477 still reproducible: the system would accept a build for a version that is not valid for that project mode. This change blocks those invalid build triggers in the shared build preparation path, makes webhook-driven version selection report them as not built, and keeps the API v3 build endpoint from serializing a missing build.
Validation:
/Users/eric/projects/readthedocs.org/.venv/bin/pytest --reuse-db --ds=readthedocs.settings.test readthedocs/rtd_tests/tests/test_core_utils.py readthedocs/core/tests/test_hooks.py readthedocs/api/v3/tests/test_builds.pyFixes #6477
Generated by Copilot.