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

feat: update client logic for DS form #24474

Closed
wants to merge 101 commits into from

Conversation

ChandanBalajiBP
Copy link
Contributor

Pull Request Template

Use this template to quickly create a well written pull request. Delete all quotes before creating the pull request.

Description

Add a TL;DR when description is extra long (helps content team)

Please include a summary of the changes and which issue has been fixed. Please also include relevant motivation
and context. List any dependencies that are required for this change

Links to Notion, Figma or any other documents that might be relevant to the PR

PR fixes following issue(s)

Fixes # (issue number)

if no issue exists, please create an issue and ask the maintainers about this first

Media

A video or a GIF is preferred. when using Loom, don’t embed because it looks like it’s a GIF. instead, just link to the video

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Chore (housekeeping or task changes that don't impact user perception)
  • This change requires a documentation update

Testing

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration.
Delete anything that is not relevant

  • Manual
  • Jest
  • Cypress

Test Plan

Add Testsmith test cases links that relate to this PR

Issues raised during DP testing

Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR)

Checklist:

Dev activity

  • 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

@github-actions
Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/5319146695.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 24474.
recreate: true.

@github-actions
Copy link

Deploy-Preview-URL: https://ce-24474.dp.appsmith.com

@ayushpahwa
Copy link
Contributor

/build-deploy-preview skip-tests=true recreate=true

@github-actions
Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/5320027081.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 24474.
recreate: true.

@github-actions
Copy link

Deploy-Preview-URL: https://ce-24474.dp.appsmith.com

@ayushpahwa
Copy link
Contributor

/ok-to-test

@github-actions
Copy link

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

@github-actions
Copy link

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

  1. cypress/e2e/Regression/Apps/EchoApiCMS_spec.js

  2. cypress/e2e/Regression/Apps/PromisesApp_spec.js
  3. cypress/e2e/Regression/ClientSide/Autocomplete/JS_AC_spec.ts
  4. cypress/e2e/Regression/ClientSide/Binding/API_with_List_Widget_spec.js
  5. cypress/e2e/Regression/ClientSide/Binding/Api_withPageload_Input_spec.js
  6. cypress/e2e/Regression/ClientSide/Binding/Button_with_API_spec.js
  7. cypress/e2e/Regression/ClientSide/Binding/JSObjectToListWidget_Spec.ts
  8. cypress/e2e/Regression/ClientSide/Binding/Promises_Spec.ts
  9. cypress/e2e/Regression/ClientSide/Binding/TableTextPagination_spec.js
  10. cypress/e2e/Regression/ClientSide/Binding/TableV2TextPagination_spec.js
  11. cypress/e2e/Regression/ClientSide/Binding/TableV2WithSnipingMode_spec.js
  12. cypress/e2e/Regression/ClientSide/Binding/TableV2_Api_spec.js
  13. cypress/e2e/Regression/ClientSide/Binding/TableV2_Widget_API_Derived_Column_spec.js
  14. cypress/e2e/Regression/ClientSide/Binding/TableV2_Widget_API_Pagination_spec.js
  15. cypress/e2e/Regression/ClientSide/Binding/TableWithSnipingMode_spec.js
  16. cypress/e2e/Regression/ClientSide/Binding/Table_Api_spec.js
  17. cypress/e2e/Regression/ClientSide/Binding/Table_Widget_API_Derived_Column_spec.js
  18. cypress/e2e/Regression/ClientSide/BugTests/AbortAction_Spec.ts
  19. cypress/e2e/Regression/ClientSide/BugTests/ApiBugs_Spec.ts
  20. cypress/e2e/Regression/ClientSide/BugTests/Bug15056_Spec.ts
  21. cypress/e2e/Regression/ClientSide/BugTests/InputTruncateCheck_Spec.ts
  22. cypress/e2e/Regression/ClientSide/ExplorerTests/API_Pane_spec.js
  23. cypress/e2e/Regression/ClientSide/Git/GitSync/GitSyncedApps_spec.js
  24. cypress/e2e/Regression/ClientSide/Git/GitWithAutoLayout/conversion_of_git_connected_apps_spec.js
  25. cypress/e2e/Regression/ClientSide/OtherUIFeatures/EntityBottomBar_spec.ts
  26. cypress/e2e/Regression/ClientSide/OtherUIFeatures/Logs2_spec.js
  27. cypress/e2e/Regression/ClientSide/OtherUIFeatures/PageOnLoad_spec.ts
  28. cypress/e2e/Regression/ClientSide/PeekOverlay/PeekOverlay_Spec.ts
  29. cypress/e2e/Regression/ClientSide/PublishedApps/PublishedModeToastToggle_Spec.ts
  30. cypress/e2e/Regression/ClientSide/Widgets/Button/Button_onClickAction_spec.js
  31. cypress/e2e/Regression/ClientSide/Widgets/Dropdown/Dropdown_onOptionChange_spec.js
  32. cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Meta_Hydration_ServerSide_spec.js
  33. cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_dataIdentifierProperty_spec.js
  34. cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_defaultSelectedItem_spec.js
  35. cypress/e2e/Regression/ClientSide/Widgets/Others/StatboxDsl_spec.js
  36. cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Derived_Column_Data_validation_spec.js
  37. cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Property_JsonUpdate_spec.js
  38. cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Derived_Column_Data_validation_spec.js
  39. cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Property_JsonUpdate_spec.js
  40. cypress/e2e/Regression/ServerSide/ActionExecution/Block_Execution.ts
  41. cypress/e2e/Regression/ServerSide/ApiTests/API_All_Verb_spec.js
  42. cypress/e2e/Regression/ServerSide/ApiTests/API_Bugs_Spec.js
  43. cypress/e2e/Regression/ServerSide/ApiTests/API_CurlPOSTImport_spec.js
  44. cypress/e2e/Regression/ServerSide/ApiTests/API_Edit_spec.js
  45. cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts
  46. cypress/e2e/Regression/ServerSide/ApiTests/API_Mustache_spec.js
  47. cypress/e2e/Regression/ServerSide/ApiTests/API_Response_View_spec.js
  48. cypress/e2e/Regression/ServerSide/ApiTests/API_Search_spec.js
  49. cypress/e2e/Regression/ServerSide/ApiTests/API_TestExecuteWithDynamicBindingInUrl_spec.ts
  50. cypress/e2e/Regression/ServerSide/ApiTests/CurlImportFlow_spec.js
  51. cypress/e2e/Regression/ServerSide/JsFunctionExecution/PlatformFn_spec.ts
  52. cypress/e2e/Regression/ServerSide/JsFunctionExecution/SetTimeout_spec.ts
  53. cypress/e2e/Regression/ServerSide/OnLoadTests/JsOnLoad3_Spec.ts
  54. cypress/e2e/Regression/ServerSide/OnLoadTests/OnLoadActions_Spec.ts
  55. cypress/e2e/Regression/ServerSide/Postgres_DataTypes/UUID_Spec.ts
  56. cypress/e2e/Sanity/Datasources/Arango_Basic_Spec.ts
  57. cypress/e2e/Sanity/Datasources/AuthenticatedApiWithOAuth_spec.ts
  58. cypress/e2e/Sanity/Datasources/GraphQL_spec.ts
  59. cypress/e2e/Sanity/Datasources/MySQLNoiseTest_spec.js
  60. cypress/e2e/Sanity/Datasources/RestApiDatasource_spec.js
To know the list of identified flaky tests - Refer here

@github-actions
Copy link

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

  1. cypress/e2e/Regression/Apps/EchoApiCMS_spec.js

  2. cypress/e2e/Regression/Apps/PromisesApp_spec.js
  3. cypress/e2e/Regression/ClientSide/Autocomplete/JS_AC_spec.ts
  4. cypress/e2e/Regression/ClientSide/Binding/API_with_List_Widget_spec.js
  5. cypress/e2e/Regression/ClientSide/Binding/Api_withPageload_Input_spec.js
  6. cypress/e2e/Regression/ClientSide/Binding/Button_with_API_spec.js
  7. cypress/e2e/Regression/ClientSide/Binding/JSObjectToListWidget_Spec.ts
  8. cypress/e2e/Regression/ClientSide/Binding/Promises_Spec.ts
  9. cypress/e2e/Regression/ClientSide/Binding/TableTextPagination_spec.js
  10. cypress/e2e/Regression/ClientSide/Binding/TableV2TextPagination_spec.js
  11. cypress/e2e/Regression/ClientSide/Binding/TableV2WithSnipingMode_spec.js
  12. cypress/e2e/Regression/ClientSide/Binding/TableV2_Api_spec.js
  13. cypress/e2e/Regression/ClientSide/Binding/TableV2_Widget_API_Derived_Column_spec.js
  14. cypress/e2e/Regression/ClientSide/Binding/TableV2_Widget_API_Pagination_spec.js
  15. cypress/e2e/Regression/ClientSide/Binding/TableWithSnipingMode_spec.js
  16. cypress/e2e/Regression/ClientSide/Binding/Table_Api_spec.js
  17. cypress/e2e/Regression/ClientSide/Binding/Table_Widget_API_Derived_Column_spec.js
  18. cypress/e2e/Regression/ClientSide/BugTests/ApiBugs_Spec.ts
  19. cypress/e2e/Regression/ClientSide/BugTests/Bug15056_Spec.ts
  20. cypress/e2e/Regression/ClientSide/BugTests/InputTruncateCheck_Spec.ts
  21. cypress/e2e/Regression/ClientSide/ExplorerTests/API_Pane_spec.js
  22. cypress/e2e/Regression/ClientSide/Git/GitSync/GitSyncedApps_spec.js
  23. cypress/e2e/Regression/ClientSide/Git/GitWithAutoLayout/conversion_of_git_connected_apps_spec.js
  24. cypress/e2e/Regression/ClientSide/OtherUIFeatures/EntityBottomBar_spec.ts
  25. cypress/e2e/Regression/ClientSide/OtherUIFeatures/Logs2_spec.js
  26. cypress/e2e/Regression/ClientSide/OtherUIFeatures/PageOnLoad_spec.ts
  27. cypress/e2e/Regression/ClientSide/PeekOverlay/PeekOverlay_Spec.ts
  28. cypress/e2e/Regression/ClientSide/PublishedApps/PublishedModeToastToggle_Spec.ts
  29. cypress/e2e/Regression/ClientSide/Widgets/Button/Button_onClickAction_spec.js
  30. cypress/e2e/Regression/ClientSide/Widgets/Dropdown/Dropdown_onOptionChange_spec.js
  31. cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Meta_Hydration_ServerSide_spec.js
  32. cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_dataIdentifierProperty_spec.js
  33. cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_defaultSelectedItem_spec.js
  34. cypress/e2e/Regression/ClientSide/Widgets/Others/StatboxDsl_spec.js
  35. cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Derived_Column_Data_validation_spec.js
  36. cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Property_JsonUpdate_spec.js
  37. cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Derived_Column_Data_validation_spec.js
  38. cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Property_JsonUpdate_spec.js
  39. cypress/e2e/Regression/ServerSide/ActionExecution/Block_Execution.ts
  40. cypress/e2e/Regression/ServerSide/ApiTests/API_All_Verb_spec.js
  41. cypress/e2e/Regression/ServerSide/ApiTests/API_Bugs_Spec.js
  42. cypress/e2e/Regression/ServerSide/ApiTests/API_CurlPOSTImport_spec.js
  43. cypress/e2e/Regression/ServerSide/ApiTests/API_Edit_spec.js
  44. cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts
  45. cypress/e2e/Regression/ServerSide/ApiTests/API_Mustache_spec.js
  46. cypress/e2e/Regression/ServerSide/ApiTests/API_Response_View_spec.js
  47. cypress/e2e/Regression/ServerSide/ApiTests/API_Search_spec.js
  48. cypress/e2e/Regression/ServerSide/ApiTests/API_TestExecuteWithDynamicBindingInUrl_spec.ts
  49. cypress/e2e/Regression/ServerSide/ApiTests/CurlImportFlow_spec.js
  50. cypress/e2e/Regression/ServerSide/JsFunctionExecution/PlatformFn_spec.ts
  51. cypress/e2e/Regression/ServerSide/JsFunctionExecution/SetTimeout_spec.ts
  52. cypress/e2e/Regression/ServerSide/OnLoadTests/JsOnLoad3_Spec.ts
  53. cypress/e2e/Regression/ServerSide/OnLoadTests/OnLoadActions_Spec.ts
  54. cypress/e2e/Regression/ServerSide/Postgres_DataTypes/UUID_Spec.ts
  55. cypress/e2e/Sanity/Datasources/Arango_Basic_Spec.ts
  56. cypress/e2e/Sanity/Datasources/AuthenticatedApiWithOAuth_spec.ts
  57. cypress/e2e/Sanity/Datasources/GraphQL_spec.ts
  58. cypress/e2e/Sanity/Datasources/MySQLNoiseTest_spec.js
  59. cypress/e2e/Sanity/Datasources/RestApiDatasource_spec.js
To know the list of identified flaky tests - Refer here

@ayushpahwa
Copy link
Contributor

/build-deploy-preview skip-tests=true recreate=true

@ayushpahwa
Copy link
Contributor

/ok-to-test

@github-actions
Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/5330162577.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 24474.
recreate: true.

@github-actions
Copy link

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

@github-actions
Copy link

Deploy-Preview-URL: https://ce-24474.dp.appsmith.com

@github-actions
Copy link

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/5330163410.
Commit: ``.
All cypress tests have passed 🎉

@ayushpahwa ayushpahwa changed the title task: update client logic for DS form feat: update client logic for DS form Jun 21, 2023
@ayushpahwa ayushpahwa marked this pull request as ready for review June 21, 2023 05:58
@github-actions github-actions bot added the Enhancement New feature or request label Jun 21, 2023
@ayushpahwa ayushpahwa requested a review from sneha122 June 21, 2023 06:03
@github-actions
Copy link

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/5330163410.
Commit: ``.
All cypress tests have passed 🎉

@ayushpahwa
Copy link
Contributor

/build-deploy-preview skip-tests=true recreate=true

@github-actions
Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/5331142924.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 24474.
recreate: true.

@ayushpahwa
Copy link
Contributor

Closing since fix is to be done with #23920

@ayushpahwa ayushpahwa closed this Jun 21, 2023
@@ -192,7 +193,7 @@ class DatasourceEditorRouter extends React.Component<Props, State> {
requiredFields: {},
configDetails: {},
filterParams: {
id: "",
id: DEFAULT_ENV_ID,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is the envId added within the filterParams? And if this is the best place to put it, can we rename the id to envId

@@ -460,8 +464,8 @@ class DatasourceSaaSEditor extends JSONtoForm<Props, State> {
pageId={pageId}
/>
) : null}
{!_.isNil(sections)
? _.map(sections, this.renderMainSection)
{!isNil(sections)
Copy link
Contributor

Choose a reason for hiding this comment

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

why is isNil preferred over isEmpty? If posible can we use isEmpty

@@ -474,17 +475,25 @@ function ReconnectDatasourceModal() {
useEffect(() => {
if (isModalOpen && !isTesting) {
const id = selectedDatasourceId;
const pending = datasources.filter((ds: Datasource) => !ds.isConfigured);
const pending = datasources.filter((ds: Datasource) =>
ds.datasourceStorages ? !isEnvironmentConfigured(ds) : true,
Copy link
Contributor

Choose a reason for hiding this comment

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

the condition here could be better since ds.datasourceStorages could be an empty Object which is still truthy. If it is fine, then please ignore


return datasource;
}),
recentDatasources: [
Copy link
Contributor

Choose a reason for hiding this comment

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

What are recentDatasources?

if (!!queryParams && queryParams.hasOwnProperty(ENVIRONMENT_QUERY_KEY)) {
return queryParams[ENVIRONMENT_QUERY_KEY].toLowerCase();
}
return "unused_env";
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we create an enum/constant for this variable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants