Force FDW defaults to use undef for things that need inputs#523
Conversation
Don't rely on a doc string, fail if no input was given.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
WalkthroughThis PR updates Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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: 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 `@src/roles/iop_fdw/defaults/main.yaml`:
- Line 5: The default variable iop_fdw_database_password in the iop_fdw role is
defined but never used; either remove this unused default or wire it into the
role's FDW/user creation tasks/templates. To fix: search the iop_fdw role for
places that create FDW users or SQL templates (tasks, templates, handlers) and
either (a) add usage of iop_fdw_database_password when creating the FDW DB
user/password in the relevant task/template, or (b) delete the
iop_fdw_database_password entry from defaults/main.yaml and, if needed, any
references in role docs/vars so there’s no undefined/unused var. Ensure the
chosen fix updates any related variable names (e.g., FDW user creation task,
template that renders user/password) and tests/playbooks that expect the
variable.
🪄 Autofix (Beta)
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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: bdd53ffc-25ee-4f4d-8825-f6726cef097d
📒 Files selected for processing (1)
src/roles/iop_fdw/defaults/main.yaml
ehelms
left a comment
There was a problem hiding this comment.
This feels like a pattern we should enforce? I wonder if an Ansible lint rule is possible.
|
What would the rule be? "There are no role defaults that are empty strings or |
Yea. And use that hint technique you are applying. Sounds like a good practice? |
|
Why are you introducing these changes? (Problem description, related links)
Don't rely on a doc string, fail if no input was given.
What are the changes introduced in this pull request?
How to test this pull request
Steps to reproduce:
Checklist