appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

fix: set Api.data on promise resolution

Open rishabhrathod01 opened this issue 2 years ago • 10 comments

Description

Set the api.data as soon as promise is resolved to avoid race condition.

NOTE: We have added a logic to set the global context similar to storeValue as a temporary fix.

PR fixes following issue(s)

Fixes #23052

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Testing

How Has This Been Tested?

Test Plan

Issues raised during DP testing

Checklist:

Dev activity

  • [x] My code follows the style guidelines of this project
  • [ ] 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
  • [ ] 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:

  • [ ] Speedbreak features have been covered
  • [ ] Test plan covers all impacted features and areas of interest
  • [ ] Test plan has been peer reviewed by project stakeholders and other QA members
  • [ ] Manually tested functionality on DP
  • [ ] We had an implementation alignment call with stakeholders post QA Round 2
  • [ ] Cypress test cases have been added and approved by SDET/manual QA
  • [ ] Added Test Plan Approved label after Cypress tests were reviewed
  • [ ] Added Test Plan Approved label after JUnit tests were reviewed

rishabhrathod01 avatar May 08 '23 06:05 rishabhrathod01

PR Summary

  • Added "name" field to ActionEntity type A new attribute "name" has been included to the ActionEntity type to provide additional information for this entity object.

  • Improved access to essential properties within functions By cloning the entire action entity instead of creating an empty object for actions in getJSFunctionsForEntity, it allows the runFnDescriptor to have access to vital properties like "data" which were previously unavailable. This enhancement leads to better functionality and usage of the action entity.

what-the-diff[bot] avatar May 08 '23 07:05 what-the-diff[bot]

/ok-to-test sha=064a6ad

rishabhrathod01 avatar May 08 '23 08:05 rishabhrathod01

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/4913336427. Workflow: Appsmith External Integration Test Workflow. Commit: 064a6ad. PR: 23060. Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=23060&runId=4913336427_1

github-actions[bot] avatar May 08 '23 08:05 github-actions[bot]

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/4913336427. Commit: 064a6ad. The following are new failures, please fix them before merging the PR:

  1. cypress/integration/Regression_TestSuite/Application/PgAdmin_spec.js
  2. cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_JSObject_Postgress_Table_spec.js
  3. cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Renaming_spec.js
  4. cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitDiscardChange/DiscardChanges_spec.js
  5. cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/GitBugs_spec.js
  6. cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/GitSyncedApps_spec.js
  7. cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/SwitchBranches_spec.js
  8. cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Omnibar_spec.js
  9. cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Replay_Editor_spec.js
  10. cypress/integration/Regression_TestSuite/ClientSideTests/Refactoring/Refactoring_spec.ts
  11. cypress/integration/Regression_TestSuite/ClientSideTests/Templates/Fork_Template_spec.js
  12. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup_withQuery_spec.js
  13. cypress/integration/Regression_TestSuite/ServerSideTests/MySQL_Datatypes/Basic_Spec.ts
  14. cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/JSOnLoad1_Spec.ts
  15. cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/JSOnLoad2_Spec.ts
  16. cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/PostgresConnections_spec.ts
  17. cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Array_Spec.ts
  18. cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Binary_Spec.ts
  19. cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/BooleanEnum_Spec.ts
  20. cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Json_Spec.ts
  21. cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/UUID_Spec.ts
  22. cypress/integration/SanitySuite/Datasources/Arango_Basic_Spec.ts
  23. cypress/integration/SanitySuite/Datasources/MockDBs_Spec.ts
  24. cypress/integration/SanitySuite/Datasources/MsSQL_Basic_Spec.ts
To know the list of identified flaky tests - Refer here

github-actions[bot] avatar May 08 '23 10:05 github-actions[bot]

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/4913336427. Commit: 064a6ad. The following are new failures, please fix them before merging the PR:

  1. cypress/integration/Regression_TestSuite/Application/PgAdmin_spec.js
  2. cypress/integration/Regression_TestSuite/ClientSideTests/Binding/Bind_JSObject_Postgress_Table_spec.js
  3. cypress/integration/Regression_TestSuite/ClientSideTests/ExplorerTests/Entity_Explorer_Entity_Renaming_spec.js
  4. cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitDiscardChange/DiscardChanges_spec.js
  5. cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/GitBugs_spec.js
  6. cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/GitSyncedApps_spec.js
  7. cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitSync/SwitchBranches_spec.js
  8. cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Omnibar_spec.js
  9. cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Replay_Editor_spec.js
  10. cypress/integration/Regression_TestSuite/ClientSideTests/Refactoring/Refactoring_spec.ts
  11. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Checkbox/CheckboxGroup_withQuery_spec.js
  12. cypress/integration/Regression_TestSuite/ServerSideTests/MySQL_Datatypes/Basic_Spec.ts
  13. cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/JSOnLoad1_Spec.ts
  14. cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/JSOnLoad2_Spec.ts
  15. cypress/integration/Regression_TestSuite/ServerSideTests/OnLoadTests/PostgresConnections_spec.ts
  16. cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Array_Spec.ts
  17. cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Binary_Spec.ts
  18. cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/BooleanEnum_Spec.ts
  19. cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/Json_Spec.ts
  20. cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/UUID_Spec.ts
  21. cypress/integration/SanitySuite/Datasources/Arango_Basic_Spec.ts
  22. cypress/integration/SanitySuite/Datasources/MockDBs_Spec.ts
  23. cypress/integration/SanitySuite/Datasources/MsSQL_Basic_Spec.ts
To know the list of identified flaky tests - Refer here

github-actions[bot] avatar May 08 '23 11:05 github-actions[bot]

/ok-to-test sha=0a9878c

rishabhrathod01 avatar May 09 '23 05:05 rishabhrathod01

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/4922507246. Workflow: Appsmith External Integration Test Workflow. Commit: 0a9878c. PR: 23060. Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=23060&runId=4922507246_1

github-actions[bot] avatar May 09 '23 05:05 github-actions[bot]

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/4922507246. Commit: 0a9878c. The following are new failures, please fix them before merging the PR:

  1. cypress/integration/Regression_TestSuite/ServerSideTests/MySQL_Datatypes/False_Spec.ts
To know the list of identified flaky tests - Refer here

github-actions[bot] avatar May 09 '23 06:05 github-actions[bot]

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/4922507246. Commit: 0a9878c. All cypress tests have passed 🎉

github-actions[bot] avatar May 09 '23 08:05 github-actions[bot]

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/4922507246. Commit: 0a9878c. All cypress tests have passed 🎉

github-actions[bot] avatar May 09 '23 09:05 github-actions[bot]