Skip to content
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

Merged
merged 8 commits into from
May 30, 2023

Conversation

likawind
Copy link
Contributor

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

  • I have created a descriptive PR title. The PR title should complete the sentence "This PR...".
  • I have performed a self-review of my code.
  • I have included a small demo of the changes. For the UI, this would be a screenshot or a Loom video.
  • If this is a new feature, I have added unit tests and integration tests.
  • I have run the integration tests locally and they are passing.
  • I have run the linter script locally (See python3 scripts/run_linters.py -h for usage).
  • All features on the UI continue to work correctly.
  • Added one of the following CI labels:
    • run_integration_test: Runs integration tests
    • skip_integration_test: Skips integration tests (Should be used when changes are ONLY documentation/UI)

@likawind likawind added the skip_integration_test Skips required integration test (only documentation/UI changes) label May 26, 2023
@eunice-chan eunice-chan force-pushed the eng-3050-fix-a-bug-where-edit-resource-dialog-crashes branch from 985a510 to 97c770a Compare May 28, 2023 20:29
…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
@likawind likawind requested a review from agiron123 May 30, 2023 18:36
@@ -1,6 +1,9 @@
import React from 'react';
import * as Yup from 'yup';

export const AzureDialog: React.FC = () => null;

/*
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup!

Copy link
Contributor

@agiron123 agiron123 left a 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 };
Copy link
Contributor Author

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!

@likawind likawind deleted the eng-3050-fix-a-bug-where-edit-resource-dialog-crashes branch May 31, 2023 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip_integration_test Skips required integration test (only documentation/UI changes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants