-
Notifications
You must be signed in to change notification settings - Fork 18
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 resource editing dialog crashing #1380
Fix resource editing dialog crashing #1380
Conversation
…g-3050-fix-a-bug-where-edit-resource-dialog-crashes
985a510
to
97c770a
Compare
…localpy' into eng-3050-fix-a-bug-where-edit-resource-dialog-crashes
…localpy' into eng-3050-fix-a-bug-where-edit-resource-dialog-crashes
…g-3050-fix-a-bug-where-edit-resource-dialog-crashes
@@ -1,6 +1,9 @@ | |||
import React from 'react'; | |||
import * as Yup from 'yup'; | |||
|
|||
export const AzureDialog: React.FC = () => null; | |||
|
|||
/* |
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 is placeholder for now, right?
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.
yup!
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.
Haven't had time to give this any manual testing yet, but code looks good otherwise.
@@ -108,23 +115,24 @@ const ResourceDialog: React.FC<Props> = ({ | |||
// We do this so we can collect name form inputs inside the same form context. | |||
const name = data.name; | |||
// remove the name key from data so pydantic doesn't throw error. | |||
delete data.name; | |||
const config = { ...data }; |
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.
@eunice-chan I've manually included your change in #1381 here, so feel free to close the PR!
Describe your changes and why you are making these changes
This PR fixes resource dialog crashing issue in edit mode. We also added edit mode support for all refactored dialogs by properly fetching the values on current resources, and disable requirements on certain fields (e.g. credentials).
Related issue number (if any)
ENG-3050
Loom demo (if any)
Tested on editing S3, WIP testing on more integrations
Checklist before requesting a review
python3 scripts/run_linters.py -h
for usage).run_integration_test
: Runs integration testsskip_integration_test
: Skips integration tests (Should be used when changes are ONLY documentation/UI)