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

Disallow deleting jobs while an update is pending #19617

Conversation

ambirdsall
Copy link
Contributor

Prevents the Magically Reappearing Job bug shown in this Loom recording. If the user clicks the "X"/"remove job" button several times in quick succession, they can see jobs reappear when a prior delete's successful response resets the form to the remaining jobs (some of which were already removed from the DOM when a subsequent update was cued).

@ambirdsall ambirdsall requested a review from a team as a code owner November 18, 2022 20:17
@octavia-squidington-iv octavia-squidington-iv added area/platform issues related to the platform area/frontend Related to the Airbyte webapp labels Nov 18, 2022
@ambirdsall ambirdsall changed the base branch from alex/give-success-feedback-for-dbt-cloud-token-submission to alex/validate-dbt-cloud-service-tokens November 18, 2022 20:25
Copy link
Contributor

@josephkmh josephkmh left a comment

Choose a reason for hiding this comment

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

Looks good! Tested deletion locally and worked well 👍

@ambirdsall
Copy link
Contributor Author

In all cases, deletion is directly handled by the remove function from formik's FieldArrayHelper; I'm a little surprised by its behavior. Specifically, these behaviors are a head-scratching combination:

  • adding a new job does not trigger an update; the new, larger job list is only in memory until the user manually clicks the save button
  • removing an unsaved new job does not trigger an update, it only modifies the unsubmitted, in-memory list
  • removing one of multiple saved jobs does immediate trigger form submission (thus the bug Andy saw)
  • removing the last saved job does not trigger form submission; the final deletion is only in memory until the user manually clicks the save button

A glance at the FieldArray docs doesn't show a way to configure the behavior of remove.

@ambirdsall ambirdsall merged commit ee53f98 into alex/validate-dbt-cloud-service-tokens Nov 18, 2022
@ambirdsall ambirdsall deleted the alex/disallow-deleting-jobs-while-a-prior-submission-is-pending branch November 18, 2022 21:22
ambirdsall added a commit that referenced this pull request Nov 21, 2022
* Clean up type definitions

Also removes the "Error" from the `{setV,v}alidationErrorMessage`
variables to pave the way for success feedback.

* Show success message and clear form on successful dbt cloud token submission

* Always clear form error state and message in sync

* Disallow deleting jobs while an update is pending
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.

None yet

3 participants