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
Fix User Data Collection checkbox #404
Fix User Data Collection checkbox #404
Conversation
…into fix-udc-checkbox
…into fix-udc-checkbox
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 didn't entirely solve the bug. If you lack some of the resources used in the updateClusterSettings
call, it breaks the API call (doesn't end it, just fails to ever complete). This can lead to issues with the UI since the requests browsers make are limited concurrently and thus you can block all other API calls if the user spams the button.
backend/src/routes/api/cluster-settings/clusterSettingsUtils.ts
Outdated
Show resolved
Hide resolved
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.
I suspect your cluster has resources that mine does not.
We should be able to gracefully handle the lack of resources. Otherwise we need to present this info upfront to the user that they do not have a proper configuration. I think in all cases in this clusterSettingsUtils
, we can gracefully handle 404s.
My error is (e.body.message
): message: 'configmaps "notebook-controller-culler-config" not found',
404 status code.
Which looks to be the scenario my culling is disabled, delete configmap
-- definitely don't need to crash and burn on that call. (line 51)
/retest |
Sorry @andrewballantyne did not mean that re-review yet |
0b74e16
to
2858103
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.
hmmm... we don't save it (if you lack the files) and say we saved it 😞 My catch-all logic sorta made the call do nothing, but look like it succeeded. Gosh, I really don't want to go overboard with refactoring this function 🤔
Okay... so this is a pre-existing problem. We fixed my concern about it not updating properly and crashing when things went off the rails. Let's go with this, and we can work to improve this method. Ideally we take this to the client shortly after #279
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrewballantyne The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* fix default udc checkbox state * updated updateClusterSettings()
* fix default udc checkbox state * updated updateClusterSettings()
* fix default udc checkbox state * updated updateClusterSettings()
Resolves: #354
Description
Replaced the default
null
state of User Data Collection checkbox. Additionally, fixed a potential cause of exceptions due to missing null checks inclusterSettingsUtils.ts
when dashboard config notebook controller spec is not present.How Has This Been Tested?
Tested locally
Merge criteria: