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(editor): Prevent saving workflow while another save is in progress #9048
Conversation
const saved = await this.workflowHelpers.saveCurrentWorkflow({ name }); | ||
if (saved) { | ||
this.isNameEditEnabled = false; | ||
} | ||
this.uiStore.removeActiveAction('workflowSaving'); |
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.
Would probably be good to do this in a try ... finally
to make sure we are never left in an inconsistent state
WorkflowPage.actions.visit(); | ||
WorkflowPage.getters.workflowNameInput().invoke('val').then((oldName) => { | ||
WorkflowPage.getters.workflowNameInputContainer().click(); | ||
WorkflowPage.getters.workflowNameInput().type('{selectall}'); |
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.
Is this some Cypress magic to select all the text?
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.
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.
Nice 👌
* master: fix(core): Ensure `status` on Axios errors is available to the BE (#9015) fix(editor): Make Webhook node pinnable (#9047) fix(core): Upgrade express to address CVE-2024-29041 (no-changelog) (#9021) fix(editor): Add fallback for expression resolution in multi-output case (#9045) ci(core): Upgrade express-openapi-validator (no-changelog) (#9022) refactor(core): Delete all auth exclusion config and checks (no-changelog) (#9044) fix(editor): Make share modal content scrollable (#9025)
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.
👌
if (saved) { | ||
this.isNameEditEnabled = false; | ||
} | ||
// Exception is handled in the helper function |
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.
Ah I didn't realize that saveCurrentWorkflow
already handles exceptions 🙈 In that case the try..finally
is probably not needed. Feel free to remove it
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.
Yeah, I was a bit surprised by try
request but thought you saw something I didn't :D Let's remove it since it's cleaner without it
✅ All Cypress E2E specs passed |
2 flaky tests on run #4550 ↗︎
Details:
cypress/e2e/5-ndv.cy.ts • 2 flaky tests
Review all test suite changes for PR #9048 ↗︎ |
* master: fix(core): Ensure only leader handles waiting executions (#9014) fix(editor): Fix execution with wait node (#9051) fix(editor): Issue showing Auth2 callback section when all properties are overriden (#8999) fix(editor): Rerun failed nodes in manual executions (#9050) fix(editor): Canvas showing error toast when clicking outside of "import workflow by url" modal (#9001) fix: Workflows executed from other workflows not stopping (#9010) fix: Fix missing input panel in node details view (#9043) fix(editor): Prevent saving workflow while another save is in progress (#9048)
Got released with |
Summary
This PR fixes a bug where users would end up with duplicate workflows when clicking Save button straight from the name input.
Related tickets and issues
Fixes ADO-2077
Review / Merge checklist
(no-changelog)
otherwise. (conventions)