feat: Add MaaSAuthPolicy,MaaSSubscription,MaaSModel resources#2660
feat: Add MaaSAuthPolicy,MaaSSubscription,MaaSModel resources#2660myakove merged 2 commits intoRedHatQE:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
WalkthroughAdds three new NamespacedResource subclasses—MaaSAuthPolicy, MaaSModel, MaaSSubscription—each setting api_group to MAAS_OPENDATAHUB_IO and implementing constructors plus to_dict methods with validation for required fields. Also adds the MAAS_OPENDATAHUB_IO constant to the ApiGroup class. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 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. |
|
@SB159 please fix the failed tox |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 1-59: This file is generated and must not be edited directly;
revert any manual changes to ocp_resources/maa_s_auth_policy.py and instead
update the class-generator so the desired change is included in the generated
output, then regenerate the code; specifically modify the generator logic that
emits the MaaSAuthPolicy class (affecting the to_dict generation and the
MaaSAuthPolicy constructor fields) so the new behavior/validation is produced by
the generator and appears in the generated MaaSAuthPolicy class when you re-run
the generator.
In `@ocp_resources/maa_s_model.py`:
- Around line 1-44: This file is generated and should not be edited directly;
update the class-generator so the change is regenerated: modify the
generator/template that produces the MaaSModel class (specifically the to_dict
method that validates model_ref and sets spec["modelRef"]) to implement the
intended fix (e.g., adjust validation, error messaging, or output structure) and
then re-run generation so MaaSModel (class MaaSModel, attribute model_ref,
method to_dict, and the use of MissingRequiredArgumentError and
NamespacedResource.ApiGroup.MAAS_OPENDATAHUB_IO) is updated; do not change this
generated file directly.
In `@ocp_resources/maa_s_subscription.py`:
- Around line 1-68: This file is generated and must not be edited directly; make
the required changes in the class-generator so regenerated output updates
MaaSSubscription (e.g., modify the generator templates that produce the
MaaSSubscription class and its to_dict method/spec handling), then regenerate
the file rather than editing ocp_resources.maa_s_subscription.py directly.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
class_generator/schema/__resources-mappings.json.gzis excluded by!**/*.gz,!class_generator/schema/**class_generator/schema/_definitions.jsonis excluded by!class_generator/schema/**
📒 Files selected for processing (4)
ocp_resources/maa_s_auth_policy.pyocp_resources/maa_s_model.pyocp_resources/maa_s_subscription.pyocp_resources/resource.py
Head branch was pushed to by a user without write access
|
/approve |
|
/lgtm |
|
/verified |
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