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

🪟 🐛 Connection Creation form should use existing values before using retreived values #15201

Closed
wants to merge 2 commits into from

Conversation

teallarson
Copy link
Contributor

@teallarson teallarson commented Aug 2, 2022

What

Closes #14844

Previously, when creating a Connection, if an item from outside the syncCatalog object was updated, when the form reinitialized, any user-configured values in the syncCatalog fields would be overwritten.

How

Now, we grab the syncCatalog from the formValues object if it exists, or else grab it from the value we got from the API.

Recommended reading order

There is only one file.

Testing

Create a new connection.
Change some of the items in the syncCatalog section (enable/disable streams, change their sync modes, etc.).
Change the value in a text input field at the top of the form.
Values on the form should not change (except for the text input field you purposely changed).

I have also manually tested other inputs on this form... changing the values of any one should not affect any of the others now. We will likely want to add unit testing to this as part of our epic to improve connection creation/editing in Q3.

@github-actions github-actions bot added area/platform issues related to the platform area/frontend Related to the Airbyte webapp labels Aug 2, 2022
@teallarson teallarson changed the title grab syncCatalog from form, else from api 🪟 🐛 Connection Creation form should use existing values before using retreived values Aug 2, 2022
@teallarson teallarson marked this pull request as ready for review August 2, 2022 13:58
@teallarson teallarson requested a review from a team as a code owner August 2, 2022 13:58
@teallarson teallarson force-pushed the teal/connection-creation-form branch from 218f9dc to 565af57 Compare August 3, 2022 13:31
@timroes
Copy link
Collaborator

timroes commented Aug 4, 2022

I've tested this, and unfortunately it doesn't seem to fix the linked issue. I still see the values changing when tying in the name field. I have some suspicion about the broken code, but will need to dig a bit deeper here.

@teallarson
Copy link
Contributor Author

I've tested this, and unfortunately it doesn't seem to fix the linked issue. I still see the values changing when tying in the name field. I have some suspicion about the broken code, but will need to dig a bit deeper here.

Thanks. I wonder why it did appear to fix it for me locally. That's also not great. I wonder if it's related to how we're currently both passing in the connection values from the page and also calculating them in the form?

@timroes
Copy link
Collaborator

timroes commented Aug 4, 2022

Superseeded by #15332

@timroes timroes closed this Aug 4, 2022
@teallarson teallarson deleted the teal/connection-creation-form branch September 26, 2022 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend Related to the Airbyte webapp area/platform issues related to the platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Connection creation UI resets replication settings anytime there's any text input/edited
2 participants