appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

fix: Execute api pagination fix

Open vaibh1297 opened this issue 2 years ago • 22 comments

Description

Url encoding added for pagination cases.

Fixes #16202

Type of change

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

How Has This Been Tested?

  • Manual
  • Unit Testing

Checklist:

  • [ ] 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

vaibh1297 avatar Oct 26 '22 10:10 vaibh1297

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
appsmith ✅ Ready (Inspect) Visit Preview Dec 12, 2022 at 7:51AM (UTC)

vercel[bot] avatar Oct 26 '22 10:10 vercel[bot]

/ok-to-test sha=84f7421

vaibh1297 avatar Nov 23 '22 12:11 vaibh1297

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3532086954. Workflow: Appsmith External Integration Test Workflow. Commit: 84f7421. PR: 17886. Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17886&runId=3532086954_1

github-actions[bot] avatar Nov 23 '22 13:11 github-actions[bot]

Tested the fix with following Apis -

  1. https://mock-api.appsmith.com/users?pageSize=1&page=3&mock_filter=abc 11
  2. https://637f8e5a2f8f56e28e8fd6ef.mockapi.io/api/v1/articles?page=3&mock filter=abc 11&pagesize=1

In both the cases, the api runs successfully In the Pagination tab, on the next and previous url, test works fine - no errors. On disabling the Encode Query Params toggle, the run as well as test fails .. this is as expected.

One concern - the Performance results have many values showing up in red in the SD (Variation%) column. @vaibh1297 - please can you connect with the performance team to check if this is acceptable.

btsgh avatar Nov 24 '22 15:11 btsgh

@SatishGandham can you please check out the performance metrics mentioned by Aparna once.

sumitsum avatar Nov 25 '22 05:11 sumitsum

Found an issue with logging into this branch using my appsmith id. It gave internal server error and the docker logs had the following errors - DockerErrors.png Logging into localhost of other branches using the same appsmith id does not give any errors. Discussed the same with @vaibh1297 - he tried it on his local with my appsmith id and he did not face any issues.

Just bringing this up here as wanted to take a call if this is something that needs to be looked at?

btsgh avatar Nov 25 '22 07:11 btsgh

@btsgh can you please share steps to reproduce the error ?

sumitsum avatar Nov 25 '22 10:11 sumitsum

@btsgh can you please share steps to reproduce the error ? @sumitsum Bring up the local environment for this branch Try to login using my appsmith credentials - [email protected] and corresponding password

btsgh avatar Nov 25 '22 11:11 btsgh

On further debugging discussion with @vaibh1297 - we found these statements in the docker log -

 [2022-11-28 09:01:12,156] [email protected], sessionId=f293963d-5787-4106-a88e-82c1127b5eee, thread=lettuce-nioEventLoop-7-1, requestId=03524d91-7f6c-43f3-8e88-46150454dd38 - Going to get all applications grouped by workspace backend stdout |  backend stdout | [2022-11-28 09:01:12,166] [email protected], sessionId=f293963d-5787-4106-a88e-82c1127b5eee, thread=lettuce-nioEventLoop-7-1, requestId=03524d91-7f6c-43f3-8e88-46150454dd38 - Cache miss for key permissionGroupsForUser:[email protected] backend stdout |  backend stdout | [2022-11-28 09:01:12,167] [email protected], sessionId=f293963d-5787-4106-a88e-82c1127b5eee, thread=lettuce-nioEventLoop-7-1, requestId=03524d91-7f6c-43f3-8e88-46150454dd38 - Cache miss for key permissionGroupsForUser:[email protected] backend stdout |  backend stdout | [2022-11-28 09:01:12,174] [email protected], sessionId=f293963d-5787-4106-a88e-82c1127b5eee, thread=nioEventLoopGroup-3-4, requestId=03524d91-7f6c-43f3-8e88-46150454dd38 -  backend stdout | java.lang.IllegalArgumentException: No enum constant com.appsmith.server.acl.AclPermission.READ_PERMISSION_GROUP_MEMBERS backend stdout |  at java.base/java.lang.Enum.valueOf(Enum.java:240) backend stdout |  Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:  backend stdout | Error has been observed at the following site(s): backend stdout |  *__checkpoint ⇢ Handler com.appsmith.server.controllers.ApplicationController#getAllApplicationsForHome() [DispatcherHandler] backend stdout | Original Stack Trace: backend stdout |  at java.base/java.lang.Enum.valueOf(Enum.java:240) backend stdout | 

btsgh avatar Nov 28 '22 09:11 btsgh

As per the suggestion by @sumitsum - deleted Stacks folder and recreated the localhost image. Works fine now.

btsgh avatar Nov 29 '22 13:11 btsgh

/ok-to-test sha=84f7421

sumitsum avatar Nov 30 '22 10:11 sumitsum

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3582774878. Workflow: Appsmith External Integration Test Workflow. Commit: 84f7421. PR: 17886. Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17886&runId=3582774878_1

github-actions[bot] avatar Nov 30 '22 12:11 github-actions[bot]

/ok-to-test sha=ee32aad

vaibh1297 avatar Dec 01 '22 09:12 vaibh1297

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3591553232. Workflow: Appsmith External Integration Test Workflow. Commit: ee32aad. PR: 17886. Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17886&runId=3591553232_1

github-actions[bot] avatar Dec 01 '22 10:12 github-actions[bot]

/ok-to-test sha=1b89d7d

Aishwarya-U-R avatar Dec 01 '22 13:12 Aishwarya-U-R

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3593486336. Workflow: Appsmith External Integration Test Workflow. Commit: 1b89d7d. PR: 17886. Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17886&runId=3593486336_1

github-actions[bot] avatar Dec 01 '22 14:12 github-actions[bot]

/ok-to-test sha=b483601

vaibh1297 avatar Dec 08 '22 07:12 vaibh1297

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

github-actions[bot] avatar Dec 08 '22 07:12 github-actions[bot]

/ok-to-test sha=62a36da

vaibh1297 avatar Dec 08 '22 09:12 vaibh1297

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

github-actions[bot] avatar Dec 08 '22 09:12 github-actions[bot]

/ok-to-test sha=38969e9

vaibh1297 avatar Dec 09 '22 12:12 vaibh1297

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

github-actions[bot] avatar Dec 09 '22 12:12 github-actions[bot]

/ok-to-test sha=b935254

vaibh1297 avatar Dec 12 '22 08:12 vaibh1297

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

github-actions[bot] avatar Dec 12 '22 08:12 github-actions[bot]