-
Notifications
You must be signed in to change notification settings - Fork 44
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
Create ray cluster with ssa #778
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #778 +/- ##
==========================================
+ Coverage 90.33% 92.45% +2.11%
==========================================
Files 23 23
Lines 1345 1378 +33
==========================================
+ Hits 1215 1274 +59
+ Misses 130 104 -26 ☔ View full report in Codecov by Sentry. |
658779c
to
11dd0cb
Compare
9d8295d
to
73987d6
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
d02ec50
to
73cbb2c
Compare
43fb625
to
6c8f3db
Compare
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.
Can we add user documentation for this PR?
https://github.com/project-codeflare/codeflare-sdk/blob/main/docs/sphinx/user-docs/ray-cluster-interaction.rst
- Adds RayCluster.apply() implementation - Adds e2e tests for apply - Adds unit tests for apply - Exclude unit tests code from coverage - Add coverage to cluster.py - Adding coverage for the case of an openshift cluster
4c07b0b
to
352c26c
Compare
352c26c
to
34b0e86
Compare
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.
Began testing this again on both Kind and OpenShift.
It seems that Appwrapper is not working with the new changes when creating a cluster via apply()
.
TypeError: Discoverer.get() takes 1 positional argument but 2 were given
crds = self.get_dynamic_client().resources | ||
if self.config.appwrapper: | ||
api_version = "workload.codeflare.dev/v1beta2" | ||
api_instance = crds.get(api_version, kind="AppWrapper") |
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.
api_instance = crds.get(api_version, kind="AppWrapper") | |
api_instance = crds.get(api_version=api_version, kind="AppWrapper") |
This should prevent a TypeError
when trying to create an AppWrapper via apply()
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.
Even with the update to the api_instance there are still errors when trying to apply AppWrappers.
Response: b'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"PatchOptions.meta.k8s.io \\"\\" is invalid: fieldManager: Required value: is required for apply patch","reason":"Invalid","details":{"group":"meta.k8s.io","kind":"PatchOptions","causes":[{"reason":"FieldValueRequired","message":"Required value: is required for apply patch","field":"fieldManager"}]},"code":422}\n'
yamls, namespace: str, api_instance: client.CustomObjectsApi, force=False | ||
): | ||
api_instance.server_side_apply( | ||
field_manager="cluster-manager", |
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.
This should probably be cf-sdk
or something similar and pulled out into a variable, used both here and for the AppWrapper
return DynamicClient(get_api_client()) | ||
|
||
def config_check(self): | ||
"""Return a dynamic client, optionally mocked in tests.""" |
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.
Is this doc string intended here?
@@ -744,6 +802,20 @@ def _create_resources(yamls, namespace: str, api_instance: client.CustomObjectsA | |||
) | |||
|
|||
|
|||
def _apply_resources( |
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.
Could you just use a partial instead of pulling this into it's own function?
Issue link
What changes have been made
Adding apply function.
Verification steps
Checks