fix: correct NetBox configuration path and heredoc indentation in CI#21
fix: correct NetBox configuration path and heredoc indentation in CI#21
Conversation
The configuration.py was written to netbox/netbox/ but NetBox expects it at netbox/netbox/netbox/ (alongside settings.py). The cat heredoc also preserved YAML indentation, producing invalid Python. Replace with python3 textwrap.dedent to generate clean unindented output.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughGitHub Actions workflow file modified to change the mechanism for writing NetBox configuration during testing. The file path for the generated configuration changed, and the approach shifted from a shell here-doc to a Python one-liner, with an inline comment removed. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
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/test-netbox-main.yaml:
- Around line 85-86: This removes the suppression for Checkov causing a
CKV_SECRET_6 false positive on test-only values; restore an inline suppression
on the test secret line by adding a comment (for example "#
checkov:skip=CKV_SECRET_6" or "# nosec") next to the SECRET_KEY assignment (and
optionally next to API_TOKEN_PEPPERS) so the CI Checkov scan ignores these
deliberate test-only secrets without changing the test values.
- Line 70: The call to
pathlib.Path('netbox/netbox/netbox/configuration.py').write_text(...) omits an
explicit encoding; update the write_text invocation to pass encoding='utf-8' so
the file is written with a deterministic UTF-8 encoding (e.g., change the
write_text call on the pathlib.Path object to include encoding='utf-8').
The configuration.py was written to netbox/netbox/ but NetBox expects it at netbox/netbox/netbox/ (alongside settings.py). The cat heredoc also preserved YAML indentation, producing invalid Python. Replace with python3 textwrap.dedent to generate clean unindented output.
Summary by CodeRabbit