feat: add maas_auth_policy and maas_subscription resources and deprecate old.#2670
feat: add maas_auth_policy and maas_subscription resources and deprecate old.#2670SB159 wants to merge 1 commit intoRedHatQE:mainfrom
Conversation
WalkthroughThis PR introduces two new MAAS OpenDataHub resource classes (MaaSAuthPolicy and MaaSSubscription) while deprecating previously-named versions with different capitalization. The old underscored versions now emit deprecation warnings on import directing users to the new camelCase equivalents. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 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 |
|
Report bugs in Issues Welcome! 🎉This pull request will be automatically processed with the following features: 🔄 Automatic Actions
📋 Available CommandsPR Status Management
Review & Approval
Testing & Validation
Cherry-pick Operations
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
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 `@ocp_resources/maa_s_auth_policy.py`:
- Around line 5-15: The deprecation warn call for MaaSAuthPolicy is inside a
generated module and must be moved out; remove the warn(...) block from this
generated file (maa_s_auth_policy.py) and place it into a non-generated
compatibility wrapper (e.g., a small hand-maintained module that imports
MaaSAuthPolicy from maas_auth_policy.py and emits the DeprecationWarning) or add
the warning into the code generator output so it persists across regenerations;
ensure the wrapper imports the class symbol MaaSAuthPolicy from
maas_auth_policy.py and emits the same DeprecationWarning with stacklevel=2,
leaving the generated NamespacedResource/exception imports untouched.
In `@ocp_resources/maa_s_subscription.py`:
- Around line 5-15: The deprecation warning shim was added inside the generated
module maa_s_subscription.py and must be removed from generated code; instead
update the generator/template to emit the deprecation or create a small
handwritten compatibility module (e.g., a new maa_s_subscription shim module)
that imports the real MaaSSubscription from maas_subscription.py and issues the
warn(…, DeprecationWarning, stacklevel=2) before re-exporting the symbol. Remove
the warn(...) block from the generated file and ensure the compatibility module
re-exports the same public symbol(s) so callers continue to work while keeping
generated code untouched.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ba693b7c-9c74-4bf4-925a-9dc90e24f18f
⛔ Files ignored due to path filters (1)
class_generator/schema/__resources-mappings.json.gzis excluded by!**/*.gz,!class_generator/schema/**
📒 Files selected for processing (4)
ocp_resources/maa_s_auth_policy.pyocp_resources/maa_s_subscription.pyocp_resources/maas_auth_policy.pyocp_resources/maas_subscription.py
…ate old
Short description:
More details:
What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for reviewer:
Bug:
Summary by CodeRabbit
New Features
Deprecations