Skip to content

[no-ci]CI: restrict preview comment cleanup to the bot author - #3485

Merged
jpascucci-nv merged 1 commit into
NVIDIA:mainfrom
jpascucci-nv:issue3484
Nov 17, 2026
Merged

jpascucci-nv merged 1 commit into
NVIDIA:mainfrom
jpascucci-nv:issue3484

Conversation

@jpascucci-nv

Copy link
Copy Markdown
Contributor

Description

closes #3484

The cleanup script matches comments by their sticky preview marker alone. A later comment quoting that marker can be selected instead of the bot's preview comment, causing cleanup to target the wrong comment and leave the preview link unchanged.

Also require the comment author to be github-actions[bot], consistent with the sticky-comment action's lookup.

Checklist

  • I have read the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

closes NVIDIA#3484

The cleanup script matches comments by their sticky preview marker alone.
A later comment quoting that marker can be selected instead of the bot's
preview comment, causing cleanup to target the wrong comment and leave
the preview link unchanged.

Also require the comment author to be github-actions[bot], consistent
with the sticky-comment action's lookup.
@jpascucci-nv jpascucci-nv added this to the cuda.core next milestone Nov 17, 2026
@jpascucci-nv
jpascucci-nv requested review from leofang and rwgk November 17, 2026 16:21
@jpascucci-nv jpascucci-nv self-assigned this Nov 17, 2026
@jpascucci-nv jpascucci-nv added the CI/CD CI/CD infrastructure label Nov 17, 2026
@jpascucci-nv jpascucci-nv changed the title CI: restrict preview comment cleanup to the bot author [no-ci]CI: restrict preview comment cleanup to the bot author Nov 17, 2026
@jpascucci-nv
jpascucci-nv enabled auto-merge (squash) November 17, 2026 16:23
@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Bug Fixes
    • Preview updates now apply only to preview comments posted by automation. Comments from other authors that contain the preview marker are left unchanged, and a new preview comment is posted when no matching automation comment exists.

The preview comment lookup now matches only comments authored by github-actions[bot] that contain the preview marker. The existing update-or-post behavior remains unchanged.

Changes: Preview comment selection

Layer / File(s) Summary
Filter preview comments by author
ci/cleanup-pr-previews
update_preview_comment now requires the comment author to be github-actions[bot] and the comment to contain the preview marker.

Assessment against linked issue

Objective Addressed Explanation
Restrict preview-comment selection to comments from the expected bot [#3484] ✅

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: Minimal · up to 9c2ee

Preview comment cleanup now ignores comments that quote the preview marker but were not written by the bot. The change is small and confined to CI, with no concrete merge-blocking risk identified.

Architecture risk: Low · up to 9c2ee

The change affects 1 system.

Changed systems: ci

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — ci (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in ci/cleanup-pr-previews: The comment lookup now requires both the github-actions[bot] author and the preview marker; comments by other authors are no longer candidates for updating.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b80866b and 9c2ee5e.

Files selected for processing: 1

  • ci/cleanup-pr-previews

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@github-actions

Copy link
Copy Markdown
Contributor

leofang added a commit to leofang/numba-cuda-mlir that referenced this pull request Nov 17, 2026
Same change as NVIDIA/cuda-python#3485: a later comment quoting the
sticky marker could otherwise be edited in place of the bot's preview
comment.

@leofang leofang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, Jason!

@rwgk rwgk 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 as an incremental change.

Looking at this from a design perspective (not for this PR):

A permanent Note in the comments with the preview URLs would seem sufficient, e.g.:

Note: These preview URLs are temporary and may stop working after this pull request is closed or merged.

This would reduce comment-editing / github notifications churn and the cleanup script's comment lookup and editing logic could be removed entirely. ci/cleanup-pr-previews would only need to delete the preview files.

leofang added a commit to NVIDIA/numba-cuda-mlir that referenced this pull request Nov 17, 2026
* Copy the PR preview deploy and cleanup from cuda-python

Verbatim copy of ci/cleanup-pr-previews,
.github/workflows/cleanup-pr-previews.yml,
.github/actions/doc_preview/action.yml and
.github/actions/get_pr_number/action.yml from NVIDIA/cuda-python at
b80866b3556717c6e702b9a9d11a7fc4ba62097d. Adapted to this repo in the
next commit.

* Adapt the PR preview cleanup to numba-cuda-mlir

Point it at NVIDIA/numba-cuda-mlir, whose previews live under
pr-preview/ at the gh-pages root, give the gh-pages lock a repo-specific
name, link the single preview URL, and pin checkout by SHA.

* Deploy docs in a job that shares the gh-pages lock

Split build-docs.yml like cuda-python: the build job uploads the docs,
and a deploy job publishes them inside the concurrency group shared with
the preview cleanup, so gh-pages writers queue instead of racing.
Previews deploy only from pull-request/* refs, and pushes to main no
longer remove the merged PR's preview; the nightly cleanup owns that.

* Match the preview comment by bot author as well as marker

Same change as NVIDIA/cuda-python#3485: a later comment quoting the
sticky marker could otherwise be edited in place of the bot's preview
comment.
@jpascucci-nv
jpascucci-nv merged commit 7be2eee into NVIDIA:main Nov 17, 2026
226 of 229 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD CI/CD infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Restrict preview-comment selection to the bot author.

3 participants