[py] Fix docs build for RtD - #17830
Conversation
Code Review by Qodo
Context used✅ Compliance rules (platform):
17 rules 1. Build failures may be masked
|
|
|
||
| commands: | ||
| - | | ||
| set -euo pipefail |
There was a problem hiding this comment.
1. Readthedocs fix lacks regression test 📘 Rule violation ▣ Testability
The PR fixes a ReadTheDocs build failure by removing shell options but adds no automated regression test or configuration validation. A future incompatible shell directive could therefore break documentation builds again without being detected before deployment.
Agent Prompt
## Issue description
The ReadTheDocs build fix removes `set -euo pipefail` without adding automated coverage for the previously failing build scenario.
## Issue Context
Add a CI check or focused test that validates the ReadTheDocs command block with its actual POSIX shell semantics and fails if unsupported Bash-only options are reintroduced.
## Fix Focus Areas
- py/docs/.readthedocs.yaml[15-17]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
|
||
| commands: | ||
| - | | ||
| set -euo pipefail |
There was a problem hiding this comment.
2. Build failures may be masked 🐞 Bug ☼ Reliability
Removing the shell's fail-fast setting allows failed installation, download, extraction, copy, or generation steps to continue, with the block potentially returning the final sphinx-build status. A transient TestPyPI or preparation failure can therefore publish stale or incomplete checkout-based documentation while the build reports success.
Agent Prompt
## Issue description
Removing `set -euo pipefail` fixes shell incompatibility but also removes explicit failure propagation from the entire multiline build command. Preserve fail-fast behavior using syntax supported by the ReadTheDocs shell, such as portable `set -e` with explicit checks for pipelines, or invoke a supported Bash shell explicitly.
## Issue Context
The command block installs dependencies, fetches and overlays a nightly sdist, generates API inputs and stubs, and finally runs Sphinx. Earlier failures must terminate the build rather than allowing later commands to determine its reported status.
## Fix Focus Areas
- py/docs/.readthedocs.yaml[15-53]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
💥 What does this PR do?
I broke the Python docs build at ReadTheDocs in #17794
This should fix it by removing bash options.
🤖 AI assistance
🔄 Types of changes