Skip to content

[py] Fix docs build for RtD - #17830

Merged
cgoldberg merged 1 commit into
SeleniumHQ:trunkfrom
cgoldberg:py-update-rtd
Jul 28, 2026
Merged

[py] Fix docs build for RtD#17830
cgoldberg merged 1 commit into
SeleniumHQ:trunkfrom
cgoldberg:py-update-rtd

Conversation

@cgoldberg

Copy link
Copy Markdown
Member

💥 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

  • No substantial AI assistance used
  • AI assisted (complete below)
    • Tool(s):
    • What was generated:
    • I reviewed all AI output and can explain the change

🔄 Types of changes

  • Bug fix (backwards compatible)
  • Documentation

@selenium-ci selenium-ci added the C-py Python Bindings label Jul 28, 2026
@SeleniumHQ SeleniumHQ deleted a comment from qodo-code-review Bot Jul 28, 2026
@cgoldberg
cgoldberg merged commit 0293446 into SeleniumHQ:trunk Jul 28, 2026
8 checks passed
@cgoldberg
cgoldberg deleted the py-update-rtd branch July 28, 2026 14:43
@SeleniumHQ SeleniumHQ deleted a comment from qodo-code-review Bot Jul 28, 2026
@qodo-code-review

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (1) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 17 rules

Grey Divider


Action required

1. Build failures may be masked 🐞 Bug ☼ Reliability
Description
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.
Code

py/docs/.readthedocs.yaml[17]

-      set -euo pipefail
Evidence
The single command block derives download metadata through pipelines, installs dependencies,
downloads and overlays generated package code, regenerates api.rst, and creates documentation
stubs before its final sphinx-build. With the removed fail-fast command, an earlier nonzero status
can be superseded by later commands; existing checkout files can let the final build proceed despite
the failed preparation.

py/docs/.readthedocs.yaml[15-53]
py/generate_api_module_listing.py[19-25]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## 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



Remediation recommended

2. ReadTheDocs fix lacks regression test 📘 Rule violation ▣ Testability
Description
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.
Code

py/docs/.readthedocs.yaml[17]

-      set -euo pipefail
Evidence
PR Compliance ID 389273 requires every bug fix to include a new or modified automated test that
fails against the pre-fix implementation. The only changed code removes set -euo pipefail from the
ReadTheDocs command block, while the PR contains no test changes covering that regression.

Rule 389273: Require tests for all new functionality and bug fixes
py/docs/.readthedocs.yaml[15-17]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## 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


Grey Divider

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

Comment thread py/docs/.readthedocs.yaml

commands:
- |
set -euo pipefail

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

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

Comment thread py/docs/.readthedocs.yaml

commands:
- |
set -euo pipefail

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-py Python Bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants