Skip to content

fix: correct NetBox configuration path and heredoc indentation in CI#21

Merged
marcinpsk merged 2 commits intomainfrom
fix/weekly-build
Feb 22, 2026
Merged

fix: correct NetBox configuration path and heredoc indentation in CI#21
marcinpsk merged 2 commits intomainfrom
fix/weekly-build

Conversation

@marcinpsk
Copy link
Owner

@marcinpsk marcinpsk commented Feb 22, 2026

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

  • Chores
    • Updated CI/CD workflow configuration setup process.

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.
@coderabbitai
Copy link

coderabbitai bot commented Feb 22, 2026

Warning

Rate limit exceeded

@marcinpsk has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 19 minutes and 49 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

Walkthrough

GitHub 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

Cohort / File(s) Summary
CI/CD Workflow Configuration
.github/workflows/test-netbox-main.yaml
Modified NetBox configuration file generation: replaced shell here-doc syntax with Python one-liner approach; updated target file path from netbox/netbox/configuration.py to netbox/netbox/netbox/configuration.py; removed inline secret-check control comment. Configuration values preserved.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 From here-docs old to Python's way,
Configuration flows with grace today,
A single line hops swift and clean,
The neatest workflow ever seen! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: correcting the NetBox configuration file path and fixing heredoc indentation issues in the CI workflow.
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 unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/weekly-build

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

@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.

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').

@marcinpsk marcinpsk merged commit 3ff48ec into main Feb 22, 2026
6 checks passed
@marcinpsk marcinpsk deleted the fix/weekly-build branch February 22, 2026 22:17
@marcinpsk marcinpsk restored the fix/weekly-build branch February 23, 2026 07:48
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.

1 participant