-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: add disk storage to session launchers #590
base: main
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 12478844553Details
💛 - Coveralls |
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.
Thanks Flora! Please see my comments.
@@ -118,9 +119,11 @@ def validate_session_launcher_patch( | |||
resource_class_id = RESET | |||
else: | |||
resource_class_id = patch.resource_class_id | |||
disk_storage = RESET if "disk_storage" in data_dict and data_dict["disk_storage"] is None else patch.disk_storage |
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.
issue: What if we don't want to change the disk storage in the PATCH? If we don't set it, the value will be None
and it causes the disk storage to be reset (in the followup code).
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.
A value of None
does NOT reset the value during the patch operation.
@@ -451,6 +455,7 @@ async def test_patch_session_launcher( | |||
assert res.json.get("name") == patch_payload["name"] | |||
assert res.json.get("description") == patch_payload["description"] | |||
assert res.json.get("resource_class_id") == patch_payload["resource_class_id"] | |||
assert res.json.get("disk_storage") == 3 |
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.
suggestion: We should add a test to check disk storage isn't modified if it isn't sent in the PATCH.
Closes #589.
Add a new
disk_storage
field to session launchers so that a custom disk size can be persisted.Note: the disk storage size is not validated when saved.
See also: SwissDataScienceCenter/renku-ui#3463
Deployment: https://renku-ci-ui-3463.dev.renku.ch/