-
Notifications
You must be signed in to change notification settings - Fork 68
feat: add DataSciencePipelinesApplication CR #2562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughIntroduces a new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ 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
Container Operations
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. |
|
/verified |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
ocp_resources/data_science_pipelines_application.py (2)
16-76: LGTM! Well-documented initialization method.The
__init__method follows the standard resource pattern, properly delegates to the parent class, and includes comprehensive parameter documentation.The raw string literal
r"""on line 30 is unnecessary since the docstring contains no escape sequences. A regular"""would suffice:- r""" + """
78-116: Well-structured spec construction with correct field mappings.The method properly delegates to the parent, validates the required
object_storagefield, and correctly transforms all snake_case parameter names to camelCase spec keys.The error message at line 83 includes the "self." prefix:
raise MissingRequiredArgumentError(argument="self.object_storage")This produces:
"...pass self.object_storage"in the error message, which is slightly awkward for user-facing output. Consider using just the parameter name:- raise MissingRequiredArgumentError(argument="self.object_storage") + raise MissingRequiredArgumentError(argument="object_storage")
📜 Review details
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 (2)
ocp_resources/data_science_pipelines_application.py(1 hunks)ocp_resources/resource.py(5 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
ocp_resources/data_science_pipelines_application.py (2)
ocp_resources/resource.py (4)
NamespacedResource(1543-1659)ApiGroup(467-579)to_dict(740-744)to_dict(1657-1659)ocp_resources/exceptions.py (1)
MissingRequiredArgumentError(5-10)
🪛 Ruff (0.14.3)
ocp_resources/resource.py
1169-1169: Star-arg unpacking after a keyword argument is strongly discouraged
(B026)
1608-1608: Star-arg unpacking after a keyword argument is strongly discouraged
(B026)
🔇 Additional comments (7)
ocp_resources/resource.py (5)
489-489: LGTM! New API group constant follows naming conventions.The constant is correctly formatted and aligns with the new
DataSciencePipelinesApplicationresource.
159-160: LGTM! Comment improves clarity.Adding the comment explaining the base64-encoded value enhances code maintainability.
862-863: LGTM! Comment adds helpful context.The comment clarifies the purpose of the
update_replaceoperation.
1165-1171: LGTM! Reformatting improves readability.The multi-line format makes the method call easier to read. The static analysis hint about star-arg unpacking after keyword arguments is a style preference (B026) rather than a functional issue—the call correctly matches the method signature.
1604-1610: LGTM! Consistent formatting with the Resource class.The reformatting mirrors the changes in the
Resource.get()method and improves consistency. The static analysis hint is a style preference, as noted in the previous comment.ocp_resources/data_science_pipelines_application.py (2)
1-7: LGTM! Clean imports and proper attribution.The auto-generated comment provides helpful context, and imports are appropriate for the resource implementation.
9-14: LGTM! Class structure follows the framework pattern.The class correctly extends
NamespacedResourceand uses the newly added API group constant.
|
/approve |
|
/approve |
|
/approve |
Short description:
Add the DataSciencePipelinesApplication CR to ocp_resources
More details:
This resource governs the lifecycle of AI pipelines in OpenShift AI
What this PR does / why we need it:
I need it for some test cases in RHOAI
Which issue(s) this PR fixes:
N/A
Special notes for reviewer:
N/A
Bug:
N/A
Summary by CodeRabbit