Skip to content

sonarqube: auto-detect newest CUDA env file per branch#1236

Merged
rapids-bot[bot] merged 1 commit into
mainfrom
fix/sonar-analysis-auto-detect-cuda-env
May 18, 2026
Merged

sonarqube: auto-detect newest CUDA env file per branch#1236
rapids-bot[bot] merged 1 commit into
mainfrom
fix/sonar-analysis-auto-detect-cuda-env

Conversation

@rgsl888prabhu
Copy link
Copy Markdown
Collaborator

The nightly main scan has been failing since 2026-05-15 because PR #1198 bumped main from CUDA 13.1 to 13.2 (replacing all_cuda-131_arch-*.yaml with all_cuda-132_arch-*.yaml), but run-sonar-analysis.sh still pointed at the deleted 13.1 yaml.

Detect inside the per-branch loop: glob conda/environments/, version-sort, take the newest. release/26.04 keeps using cuda-131 (still on disk there); main now picks cuda-132 automatically; future bumps need no script change. Loud failure if no matching env file exists at all.

The nightly main scan has been failing since 2026-05-15 because PR
#1198 bumped main from CUDA 13.1 to 13.2 (replacing
all_cuda-131_arch-*.yaml with all_cuda-132_arch-*.yaml), but this
script still pointed at the deleted 13.1 yaml.

Detect inside the per-branch loop: glob conda/environments/, version-sort,
take the newest. release/26.04 keeps using cuda-131 (still on disk
there); main now picks cuda-132 automatically; future bumps need no
script change.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rgsl888prabhu rgsl888prabhu requested a review from a team as a code owner May 18, 2026 20:12
@rgsl888prabhu rgsl888prabhu requested a review from tmckayus May 18, 2026 20:12
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 18, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b6ff66fb-5e54-4839-8869-f80640a1eb15

📥 Commits

Reviewing files that changed from the base of the PR and between 6f99a42 and 6bb0d98.

📒 Files selected for processing (1)
  • sonarqube/run-sonar-analysis.sh

📝 Walkthrough

Walkthrough

The SonarQube analysis script shifts from hardcoded conda environment setup at startup to dynamic selection. CPU architecture is detected once, then per-branch conda environment YAML files matching that architecture are discovered, sorted by version, and the newest is selected. Missing candidates are logged and skipped gracefully.

Changes

Dynamic conda environment selection by architecture

Layer / File(s) Summary
Dynamic conda environment selection by architecture
sonarqube/run-sonar-analysis.sh
CPU architecture is determined at startup and used to discover matching all_cuda-*_arch-${ARCH}.yaml candidates within each cloned branch. The newest version-sorted candidate is selected; if none exist, the branch failure is recorded and processing continues to the next branch.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

non-breaking, improvement

Suggested reviewers

  • msarahan
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: auto-detecting the newest CUDA environment file per branch instead of hardcoding a single version.
Description check ✅ Passed The description clearly explains the problem (CUDA version bump broke hardcoded reference), the solution (auto-detect newest env file per branch), and expected behavior for different branches.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/sonar-analysis-auto-detect-cuda-env

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

@rgsl888prabhu rgsl888prabhu self-assigned this May 18, 2026
@rgsl888prabhu rgsl888prabhu added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels May 18, 2026
@rgsl888prabhu
Copy link
Copy Markdown
Collaborator Author

/merge

@rapids-bot rapids-bot Bot merged commit bad09ac into main May 18, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants