Skip to content

ci: Re-enable dependabot#2489

Merged
ko3n1g merged 2 commits intomainfrom
ko3n1g/ci/dependabot-token
Feb 23, 2026
Merged

ci: Re-enable dependabot#2489
ko3n1g merged 2 commits intomainfrom
ko3n1g/ci/dependabot-token

Conversation

@ko3n1g
Copy link
Copy Markdown
Contributor

@ko3n1g ko3n1g commented Feb 23, 2026

What does this PR do ?

Add a one line overview of what this PR aims to accomplish.

Changelog

  • Add specific line by line info of high level changes in this PR.

GitHub Actions CI

See the CI sectionin the Contributing doc for how to trigger the CI. A Nvidia developer will need to approve and trigger the CI for external contributors.

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

If you haven't finished some of the above items you can still open "Draft" PR.

Additional Information

  • Related to # (issue)

Summary by CodeRabbit

  • Chores
    • Enhanced authentication for automated dependency update workflows to enable more reliable and secure operations.

Signed-off-by: oliver könig <okoenig@nvidia.com>
@ko3n1g ko3n1g requested a review from a team as a code owner February 23, 2026 12:03
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 23, 2026

📝 Walkthrough

Walkthrough

Adds Personal Access Token authentication to GitHub Actions checkout steps for TARGET_BRANCH and SOURCE_BRANCH in the update dependencies workflow, enabling authenticated submodule operations.

Changes

Cohort / File(s) Summary
GitHub Actions Authentication
.github/workflows/_update_dependencies.yml
Injects secrets.PAT token to both TARGET_BRANCH and SOURCE_BRANCH checkout steps for authenticated submodule operations.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested reviewers

  • thomasdhc
  • yaoyu-33
🚥 Pre-merge checks | ✅ 2 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Test Results For Major Changes ⚠️ Warning PR contains 904 files with 232,513 lines added but provides only minimal template text without required test results, validation data, or documentation of changes. Update PR description with: (1) comprehensive test results; (2) numerics/convergence validation; (3) performance benchmarks; (4) documentation of added code/features; (5) clear explanation of large change scope.
Title check ❓ Inconclusive The title 'ci: Re-enable dependabot' is vague and does not clearly describe the actual change, which is adding PAT token authentication to GitHub Actions checkout steps. Revise the title to be more specific about the actual change, such as 'ci: Use PAT for dependabot authentication' or 'ci: Add token authentication to dependabot workflow'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ko3n1g/ci/dependabot-token

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.github/workflows/_update_dependencies.yml (2)

186-204: ⚠️ Potential issue | 🟠 Major

Direct push to TARGET_BRANCH bypasses branch protection.

Lines 199–203 check out TARGET_BRANCH, apply a squash merge from SOURCE_BRANCH, and force-push directly — completely bypassing any required status checks or required-review rules on that branch. The CI-check-wait step earlier only covers the intermediate bump PR, not the squash commit itself.

If TARGET_BRANCH is protected, consider merging via the GitHub API (gh pr merge --squash) instead of raw git push, so branch-protection rules are honoured by the platform:

♻️ Alternative: use `gh pr merge` to respect branch protection
-          git config user.name "github-actions[bot]"
-          git config user.email "github-actions[bot]@users.noreply.github.com"
-          git fetch origin ${{ env.SOURCE_BRANCH }}
-          git fetch origin ${{ env.TARGET_BRANCH }}
-          git checkout ${{ env.TARGET_BRANCH }}
-          git merge --squash origin/${{ env.SOURCE_BRANCH }}
-          git commit -m "${{ env.title }}"
-          git pull --rebase origin ${{ env.TARGET_BRANCH }}
-          git push origin ${{ env.TARGET_BRANCH }}
-          git push origin --delete ${{ env.SOURCE_BRANCH }}
+          gh pr merge "$PR_NUMBER" --squash --subject "${{ env.title }}" --delete-branch
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/_update_dependencies.yml around lines 186 - 204, The
workflow currently checks out and squash-merges SOURCE_BRANCH into TARGET_BRANCH
using git merge --squash and git push, which bypasses branch protection; replace
the direct checkout/commit/push sequence (the block using git fetch, git
checkout ${{ env.TARGET_BRANCH }}, git merge --squash origin/${{
env.SOURCE_BRANCH }}, git commit, git push, git push --delete) with a GitHub
API/CLI merge that uses the created PR number
(steps.create-pull-request.outputs.pull-request-number) — e.g., call gh pr merge
--repo ${{ github.repository }} $PR_NUMBER --squash --delete-branch (ensure GH
auth setup and required permissions) so the merge honors branch-protection and
required checks instead of performing a raw git push.

148-184: ⚠️ Potential issue | 🟠 Major

Unbounded while true loop — add a max-iteration or step timeout guard.

The polling loop has no upper bound: if a required check stalls, the GitHub status API is flaky, or the PR is never created, the runner loops indefinitely at sleep 30 per iteration. A stuck job consumes billed runner minutes and holds a concurrency slot until the workflow-level timeout-minutes (if any) fires.

Add either a timeout-minutes on the step or a hard cap on iterations:

🛡️ Proposed fix — add a max-attempts guard
+          MAX_ATTEMPTS=120   # 120 × 30 s = 1 h max
           i=0
           INITIALIZED=false
           while true; do
             i=$((i + 1))
+            if [ "$i" -gt "$MAX_ATTEMPTS" ]; then
+              echo "Timed out waiting for required checks after $MAX_ATTEMPTS attempts"
+              exit 1
+            fi

Alternatively, set a timeout-minutes on the step itself in the YAML:

       - name: Wait for CI checks
+        timeout-minutes: 60
         env:
           GH_TOKEN: ${{ secrets.PAT }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/_update_dependencies.yml around lines 148 - 184, The
infinite polling loop (while true) using i/INITIALIZED and sleep 30 can stall
indefinitely; add a hard cap by introducing a MAX_ATTEMPTS (or MAX_RETRIES) and
increment/check i each iteration (e.g., if i -ge MAX_ATTEMPTS then echo a
timeout/failure message and exit 1) before sleeping, or alternatively set a
timeout-minutes on the workflow step so the runner kills the job; update the
loop that reads CHECKS_JSON/REQUIRED_CHECKS and the final sleep 30 block to
respect this max-attempts guard (referencing the existing i, INITIALIZED, sleep
30, PR_NUMBER and REQUIRED_CHECKS symbols).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In @.github/workflows/_update_dependencies.yml:
- Around line 186-204: The workflow currently checks out and squash-merges
SOURCE_BRANCH into TARGET_BRANCH using git merge --squash and git push, which
bypasses branch protection; replace the direct checkout/commit/push sequence
(the block using git fetch, git checkout ${{ env.TARGET_BRANCH }}, git merge
--squash origin/${{ env.SOURCE_BRANCH }}, git commit, git push, git push
--delete) with a GitHub API/CLI merge that uses the created PR number
(steps.create-pull-request.outputs.pull-request-number) — e.g., call gh pr merge
--repo ${{ github.repository }} $PR_NUMBER --squash --delete-branch (ensure GH
auth setup and required permissions) so the merge honors branch-protection and
required checks instead of performing a raw git push.
- Around line 148-184: The infinite polling loop (while true) using
i/INITIALIZED and sleep 30 can stall indefinitely; add a hard cap by introducing
a MAX_ATTEMPTS (or MAX_RETRIES) and increment/check i each iteration (e.g., if i
-ge MAX_ATTEMPTS then echo a timeout/failure message and exit 1) before
sleeping, or alternatively set a timeout-minutes on the workflow step so the
runner kills the job; update the loop that reads CHECKS_JSON/REQUIRED_CHECKS and
the final sleep 30 block to respect this max-attempts guard (referencing the
existing i, INITIALIZED, sleep 30, PR_NUMBER and REQUIRED_CHECKS symbols).

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9ecee6c and 98096fd.

📒 Files selected for processing (1)
  • .github/workflows/_update_dependencies.yml

@ko3n1g ko3n1g merged commit 1d65cd8 into main Feb 23, 2026
56 checks passed
@ko3n1g ko3n1g deleted the ko3n1g/ci/dependabot-token branch February 23, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants