X-ORG-3107: Publish API docs to docs.nvidia.com - #3108
X-ORG-3107: Publish API docs to docs.nvidia.com#3108josephine-wolf-oberholtzer wants to merge 2 commits into
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughChangesAPI documentation publishing
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/build.yaml:
- Around line 128-131: Update the publish-api-docs invocation in the
workflow_dispatch path to pass the checked-out build revision `${{ inputs.sha
}}` through the workflow’s supported sha/ref input, ensuring the publisher uses
the same revision as docs-build; alternatively prevent live publishing when the
revisions differ.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: cbdbf21c-c0ac-4582-8f41-9410fe742979
📒 Files selected for processing (2)
.github/workflows/build.yaml.github/workflows/pr.yaml
| uses: rapidsai/shared-workflows/.github/workflows/publish-api-docs.yaml@main | ||
| with: | ||
| docs-projects: raft | ||
| dry-run: false |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
publisher="$(curl -fsSL \
https://raw.githubusercontent.com/rapidsai/shared-workflows/main/.github/workflows/publish-api-docs.yaml)"
grep -nE 'actions/checkout|ref:|Read VERSION|rapids-version-major-minor' <<<"${publisher}"
rg -n 'publish-api-docs|sha: \$\{\{ inputs\.sha \}\}' .github/workflows/build.yamlRepository: NVIDIA/raft
Length of output: 1115
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- local workflow ---'
sed -n '95,140p' .github/workflows/build.yaml
printf '%s\n' '--- shared publisher workflow ---'
curl -fsSL \
https://raw.githubusercontent.com/rapidsai/shared-workflows/main/.github/workflows/publish-api-docs.yaml |
sed -n '1,180p'Repository: NVIDIA/raft
Length of output: 7375
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- workflow inputs and triggers ---'
sed -n '1,115p' .github/workflows/build.yaml
printf '%s\n' '--- documentation build script ---'
sed -n '1,220p' ci/build_docs.sh
printf '%s\n' '--- SHA and VERSION references ---'
rg -n 'inputs\.sha|github\.sha|VERSION|rapids-version-major-minor|workflow_dispatch|workflow_call' \
.github/workflows/build.yaml ci/build_docs.shRepository: NVIDIA/raft
Length of output: 6637
🌐 Web query:
GitHub actions/checkout default ref reusable workflow workflow_call github.ref caller workflow documentation
💡 Result:
When using actions/checkout within a reusable workflow (triggered by workflow_call), the action defaults to checking out the caller's repository and the ref/SHA that triggered the caller workflow [1][2]. This occurs because, by design, reusable workflows run in the context of the caller, meaning the github context (repository, ref, sha, etc.) reflects the caller workflow, not the reusable workflow [1][3]. If you intend to check out the repository that contains the reusable workflow itself, you must explicitly configure the actions/checkout step to do so [4][5]. You can accomplish this by using the job context properties job.workflow_repository and job.workflow_sha [4]: - job.workflow_repository: The owner/repo of the repository containing the reusable workflow file [4]. - job.workflow_sha: The commit SHA of the reusable workflow file [4]. Example configuration to checkout the reusable workflow's repository: - uses: actions/checkout@v6 with: repository: ${{ job.workflow_repository }} ref: ${{ job.workflow_sha }} This ensures the checkout action pulls the specific version of the repository that defines the reusable workflow, rather than the caller's repository and ref [4][1].
Citations:
- 1: https://pipelinesandpizza.com/posts/git/github-actions-reusable-workflows/
- 2: https://wiki.hoelee.com/content/stackoverflow.com_en_all_2023-11/questions/73691929/github-action-reusable-workflow-run-a-github-actions-workflow-in-the-context-o
- 3: make reference accessible in reusable workflow actions/toolkit#1264
- 4: when used as part of a reusable workflow the default behaviour is always to checkout "main" branch actions/checkout#1418
- 5: https://stackoverflow.com/questions/76085450/how-to-check-out-a-reusable-workflows-repo-in-github-actions
Pass the build SHA to the publisher.
During workflow_dispatch, docs-build checks out ${{ inputs.sha }}, but the publisher checks out the caller’s branch ref and reads its VERSION. Pass ${{ inputs.sha }} through a new sha or ref input, or block live publishing when the refs differ.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/build.yaml around lines 128 - 131, Update the
publish-api-docs invocation in the workflow_dispatch path to pass the
checked-out build revision `${{ inputs.sha }}` through the workflow’s supported
sha/ref input, ensuring the publisher uses the same revision as docs-build;
alternatively prevent live publishing when the revisions differ.
Source: MCP tools
|
/merge |
Contributes to #3107