Skip to content

fix(ci): skip docs preview cleanup for fork PRs - #12648

Merged
newling merged 1 commit into
ROCm:developfrom
newling:users/newling/docs-preview-cleanup-skip-forks
Oct 29, 2026
Merged

newling merged 1 commit into
ROCm:developfrom
newling:users/newling/docs-preview-cleanup-skip-forks

Conversation

@newling

@newling newling commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Repository members and owners can comment /docs-preview on a pull request to request a temporary documentation preview on Read the Docs. This feature and its cleanup workflow were introduced in #1413. When the PR closes, the cleanup workflow looks for the bot's preview comment and deactivates the corresponding Read the Docs version.

Preview creation explicitly supports only branches in ROCm/rocm-libraries and rejects PRs whose source branch is in a fork. Cleanup, however, runs for every closed PR. On a fork PR, GitHub withholds repository secrets from the pull_request workflow, so cleanup fails while generating its GitHub App token, before it can check whether a preview exists. For example, the cleanup job after #12425 merged failed at token creation, even though that PR had no documentation preview.

Run the cleanup job only when the PR's source repository matches the repository running the workflow. Fork PRs then skip cleanup before accessing secrets, while previews from branches in this repository retain their existing cleanup behavior.

This change aligns cleanup with the preview system's current limitations. Supporting documentation previews from forks would be a separate feature: preview creation would need to accept fork sources, and trusted automation would need to create and deactivate those previews while keeping credentials isolated from contributor-controlled code.

Validation: the root pre-commit checks and git diff --check pass after rebasing onto origin/develop. actionlint reports only the existing warning about inline use of github.head_ref, with identical diagnostics on the base and this branch. The close-event behavior has not yet been exercised by a new GitHub Actions run.

@github-actions github-actions Bot added github actions project: none Does not target any component labels Sep 28, 2026
@therock-pr-bot

therock-pr-bot Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

✅ All Checks Passed — Ready for Review

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass PR does not contain code files — Unit Test auto-passed
🔎 pre-commit ✅ Pass —
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —
🤖 therock-pr-bot ✅ Pass —

🎉 All checks passed! This PR is ready for review.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@therock-pr-bot

Copy link
Copy Markdown

🎉 All checks passed! This PR is ready for review.

@newling
newling marked this pull request as ready for review September 29, 2026 15:24
@newling
newling requested a review from a team as a code owner September 29, 2026 15:24
@newling
newling force-pushed the users/newling/docs-preview-cleanup-skip-forks branch from efdad03 to e23169c Compare September 29, 2026 15:24
@newling
newling requested a review from geomin12 October 13, 2026 20:36

@jinchen62 jinchen62 left a comment

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.

LGTM

@newling
newling enabled auto-merge (squash) October 14, 2026 17:09
@newling
newling force-pushed the users/newling/docs-preview-cleanup-skip-forks branch 6 times, most recently from bd783a3 to 8b5e57b Compare October 19, 2026 14:39
@newling
newling force-pushed the users/newling/docs-preview-cleanup-skip-forks branch from 8b5e57b to 4fdd463 Compare October 19, 2026 21:22
@newling
newling requested a review from a team as a code owner October 19, 2026 21:22
@newling
newling force-pushed the users/newling/docs-preview-cleanup-skip-forks branch 2 times, most recently from f4d8c8e to f2b5362 Compare October 22, 2026 19:27
@newling
newling force-pushed the users/newling/docs-preview-cleanup-skip-forks branch from f2b5362 to 58faea3 Compare October 23, 2026 16:27
@newling
newling force-pushed the users/newling/docs-preview-cleanup-skip-forks branch from 58faea3 to 2efd090 Compare October 24, 2026 00:24
@newling
newling force-pushed the users/newling/docs-preview-cleanup-skip-forks branch 4 times, most recently from d43a7a7 to b00c398 Compare October 27, 2026 01:24
@newling
newling force-pushed the users/newling/docs-preview-cleanup-skip-forks branch 2 times, most recently from ae28fd8 to 85bf92e Compare October 28, 2026 17:00
@newling
newling disabled auto-merge October 28, 2026 19:25
@newling
newling enabled auto-merge (squash) October 29, 2026 17:27
@newling
newling force-pushed the users/newling/docs-preview-cleanup-skip-forks branch from 85bf92e to 51a10ef Compare October 29, 2026 17:27
@newling
newling merged commit c499aac into ROCm:develop Oct 29, 2026
30 checks passed
newling added a commit to ROCm/TheRock that referenced this pull request Oct 29, 2026
Windows component tests stop before artifact download when Chocolatey
fails to install Ninja ([HTTP 499
failure](https://github.com/ROCm/rocm-libraries/actions/runs/39270899358/job/118164640583)).
Remove that shared setup step and install Ninja through the existing
test virtual environment only for jobs that need it. Linux uses the same
requirement, and both base test Dockerfiles drop their system Ninja
package.

Ninja 1.13.2 is currently the latest release on
[PyPI](https://pypi.org/project/ninja/) and
[upstream](https://github.com/ninja-build/ninja/releases/tag/v1.13.2).
Use `ninja>=1.13.2` rather than an exact pin: this excludes the known
MSVC linker response-file regression while allowing newer releases,
matching the minimum used in #8929. The Python wheel contains the native
executable and uses the test virtual environment's existing PATH setup.

In the Windows
[libhipcxx](https://github.com/ROCm/TheRock/actions/runs/39320816466/job/118353150368#step:12:1)
and [hipDNN
installation-test](https://github.com/ROCm/TheRock/actions/runs/39320816466/job/118353149786#step:12:1)
logs, uv resolves, prepares and installs Ninja in about 0.4–1.6 seconds.
A successful [Chocolatey install through internal
Nexus](https://github.com/ROCm/TheRock/actions/runs/39320816466/job/118302133725)
takes about 4.7 seconds including command startup. These are different
runners and cache states, so this is an observed cost comparison, not a
controlled pip-versus-Chocolatey benchmark.

The other direct CI Chocolatey installs select internal Nexus; the
removed test-setup call contacted the public feed. Installing through
the test venv removes that separate package-manager dependency.
Requirements remain registered per consuming job in TheRock until the
components ship their own requirements files in test artifacts.

Local GitHub Actions unit tests, pre-commit, Windows wheel checks, and a
Linux CMake build/CTest using the venv's Ninja pass. The previous
revision passed the Windows Ninja-consuming component jobs; CI for this
revision and validation of rebuilt test images remain pending.

ISSUE ID : ROCm/rocm-libraries#12648

- [x] Reviewed the [contributing
guidelines](https://github.com/ROCm/TheRock/blob/main/CONTRIBUTING.md).
@assistant-librarian

Copy link
Copy Markdown
Contributor

TheRock Submodule Bump Activity

Newest first

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants