appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

fix: Return default page id instead of id in restore snapshot API

Open nayan-rafiq opened this issue 1 year ago • 17 comments

Description

The restore snapshot API returns the Application object that was restored. In current implementation, it returns pages with _id as the id. This creates problem when the Application is Git connected because no page will be found with the _id and branch name. This PR fixes this problem by replacing the id with the defaultPageId.

PR fixes following issue(s)

Fixes #22956

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

nayan-rafiq avatar May 08 '23 18:05 nayan-rafiq

/build-deploy-preview

rahulramesha avatar May 09 '23 08:05 rahulramesha

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

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

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

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

@nayan-rafiq can you add any tests to cover this?

Thanks for the review. I've added tests for the case.

nayan-rafiq avatar May 09 '23 13:05 nayan-rafiq

/ok-to-test sha=45a511e392b77a04fe6cbc642dcfa3dc4711b7e9

nayan-rafiq avatar May 09 '23 13:05 nayan-rafiq

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

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

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

  1. cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Omnibar_spec.js
  2. cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/BooleanEnum_Spec.ts
To know the list of identified flaky tests - Refer here

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

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

  1. cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Omnibar_spec.js
  2. cypress/integration/Regression_TestSuite/ServerSideTests/Postgres_DataTypes/BooleanEnum_Spec.ts
To know the list of identified flaky tests - Refer here

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

@nayan-rafiq -Merge latest release & trigger new oktotest. Cancelling the re-run since its past 12 hours from initial attempt.

Aishwarya-U-R avatar May 10 '23 06:05 Aishwarya-U-R

/ok-to-test sha=c4533ea

nayan-rafiq avatar May 10 '23 07:05 nayan-rafiq

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

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

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

  1. cypress/integration/Regression_TestSuite/ClientSideTests/OtherUIFeatures/Omnibar_spec.js
To know the list of identified flaky tests - Refer here

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

/ok-to-test sha=15f0447

nayan-rafiq avatar May 11 '23 03:05 nayan-rafiq

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

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

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

  1. cypress/integration/Regression_TestSuite/ClientSideTests/BugTests/AbortAction_Spec.ts
To know the list of identified flaky tests - Refer here

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

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

    To know the list of identified flaky tests - Refer here

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

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

      To know the list of identified flaky tests - Refer here

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

      /ok-to-test sha=2c7bed0

      nayan-rafiq avatar May 11 '23 21:05 nayan-rafiq

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

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

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

      1. cypress/integration/Regression_TestSuite/Application/EchoApiCMS_spec.js
      2. cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitImport/GitImport_spec.js
      3. cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Command_Click_Navigation_spec.js
      4. cypress/integration/Regression_TestSuite/ClientSideTests/Widgets/Others/IconButton_spec.js
      5. cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/MySQL2_Spec.ts
      6. cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/Postgres2_Spec.ts
      To know the list of identified flaky tests - Refer here

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

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

      1. cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Command_Click_Navigation_spec.js
      To know the list of identified flaky tests - Refer here

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

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

      1. cypress/integration/Regression_TestSuite/ClientSideTests/Git/GitImport/GitImport_spec.js
      2. cypress/integration/Regression_TestSuite/ClientSideTests/IDE/Command_Click_Navigation_spec.js
      3. cypress/integration/Regression_TestSuite/ServerSideTests/GenerateCRUD/MySQL2_Spec.ts
      To know the list of identified flaky tests - Refer here

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

      Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/4952687721. Commit: 2c7bed0. All cypress tests have passed 🎉

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

      Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/4952687721. Commit: 2c7bed0. All cypress tests have passed 🎉

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