fix: Race condition to save datasource and action in import flow
Description
We are seeing the flakiness in the import flow testcases, which is happening due to the race condition while saving the datasources and the actions. As we embed the datasource reference within the action object if because of the race condition action got saved prior to datasource imported application ends up with invalid action. References from CI failed jobs:
| Failed Test | CI run |
|---|---|
| importApplicationFromValidJsonFileTest | https://github.com/appsmithorg/appsmith/actions/runs/3828799911/attempts/1 |
| importApplication_withUnConfiguredDatasources_Success | https://github.com/appsmithorg/appsmith/actions/runs/3828799911/attempts/2 |
Type of change
- Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested?
- Manual
Checklist:
Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag
QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or manual QA
- [ ] Organized project review call with relevant stakeholders after Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
| Name | Status | Preview | Updated |
|---|---|---|---|
| appsmith | ⬜️ Ignored (Inspect) | Jan 4, 2023 at 3:26PM (UTC) |
/ok-to-test sha=1247d3c
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3839320077.
Workflow: Appsmith External Integration Test Workflow.
Commit: 1247d3c.
PR: 19490.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=19490&runId=3839320077_1
The following are new failures, please fix them before merging the PR cypress/integration/Smoke_TestSuite/ClientSideTests/BugTests/Autocomplete_JS_spec.ts cypress/integration/Smoke_TestSuite/ServerSideTests/QueryPane/EmptyDataSource_spec.js
The following are new failures, please fix them before merging the PR cypress/integration/Smoke_TestSuite/ClientSideTests/BugTests/Autocomplete_JS_spec.ts cypress/integration/Smoke_TestSuite/ServerSideTests/QueryPane/EmptyDataSource_spec.js