post-inventory command, plus a toggle to turn off cache.nixos.org#44
post-inventory command, plus a toggle to turn off cache.nixos.org#44
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a new Changes
Sequence Diagram(s)sequenceDiagram
participant GH as GitHub Actions
participant Disabled as DisabledCacheNixOSOrg Job
participant Inventory as Inventory Step
participant PostCmd as Post-inventory Commands
participant Determinate as DeterminateCI Job
participant Cache as cache.nixos.org
GH->>Disabled: trigger DisabledCacheNixOSOrg
Disabled->>Inventory: run inventory (with disable-cache-nixos-org=true)
Inventory->>Cache: check substituters (cache may be disabled)
Inventory-->>Disabled: report inventory results
Disabled->>PostCmd: if post-inventory-commands non-empty, run commands
PostCmd-->>Disabled: return exit status (fail if cache.nixos.org present)
GH->>Determinate: DeterminateCI waits (needs DisabledCacheNixOSOrg)
Disabled-->>Determinate: complete -> allow DeterminateCI to proceed
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
4ba4eee to
d3c81b5
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/workflow.yml:
- Around line 125-127: The "Post-inventory commands" step currently runs
commands from the repo root causing wrong paths for non-root flakes; update that
step to execute in the configured flake directory by either adding
working-directory: ${{ inputs.directory }} to the "Post-inventory commands" job
step or prefixing the run command with cd ${{ inputs.directory }} && ${{
inputs.post-inventory-commands }} so the step uses the same inputs.directory as
the inventory step.
In `@README.md`:
- Line 61: The README's `runner-map` example documents the `aarch64-linux`
default as "ubuntu-latest" which mismatches the workflow's actual default
"ubuntu-24.04-arm"; update the `runner-map` example entry for `aarch64-linux` to
"ubuntu-24.04-arm" so the docs match the workflow, ensuring any references to
`runner-map` or `aarch64-linux` consistently reflect the workflow default
`ubuntu-24.04-arm`.
| - name: Post-inventory commands | ||
| if: ${{ inputs.post-inventory-commands != '' }} | ||
| run: ${{ inputs.post-inventory-commands }} |
There was a problem hiding this comment.
Run post-inventory commands in the configured flake directory.
On Line 127, commands run from the repository root, but the inventory command runs in inputs.directory (Line 122). For non-root flakes, post-inventory commands can execute against the wrong path.
Suggested fix
- name: Post-inventory commands
if: ${{ inputs.post-inventory-commands != '' }}
+ working-directory: ${{ inputs.directory }}
run: ${{ inputs.post-inventory-commands }}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Post-inventory commands | |
| if: ${{ inputs.post-inventory-commands != '' }} | |
| run: ${{ inputs.post-inventory-commands }} | |
| - name: Post-inventory commands | |
| if: ${{ inputs.post-inventory-commands != '' }} | |
| working-directory: ${{ inputs.directory }} | |
| run: ${{ inputs.post-inventory-commands }} |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/workflow.yml around lines 125 - 127, The "Post-inventory
commands" step currently runs commands from the repo root causing wrong paths
for non-root flakes; update that step to execute in the configured flake
directory by either adding working-directory: ${{ inputs.directory }} to the
"Post-inventory commands" job step or prefixing the run command with cd ${{
inputs.directory }} && ${{ inputs.post-inventory-commands }} so the step uses
the same inputs.directory as the inventory step.
4c9eef4 to
bbcfbf0
Compare
d1a8539 to
a77a72c
Compare
Summary by CodeRabbit
New Features
Documentation