fix:query response count on error in QueryDebuggerTabs#35363
fix:query response count on error in QueryDebuggerTabs#35363yatinappsmith merged 8 commits intoappsmithorg:releasefrom
Conversation
WalkthroughThe recent updates enhance the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant QueryDebuggerTabs
participant API
User->>QueryDebuggerTabs: Trigger Query
QueryDebuggerTabs->>API: Send Request
API-->>QueryDebuggerTabs: Success Response
QueryDebuggerTabs->>User: Display Output Length
User->>QueryDebuggerTabs: Trigger Query
QueryDebuggerTabs->>API: Send Request
API-->>QueryDebuggerTabs: Failed Response
QueryDebuggerTabs->>User: Display Error Message
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (2)
- app/client/src/pages/Editor/QueryEditor/QueryDebuggerTabs.test.tsx (2 hunks)
- app/client/src/pages/Editor/QueryEditor/QueryDebuggerTabs.tsx (1 hunks)
Additional comments not posted (5)
app/client/src/pages/Editor/QueryEditor/QueryDebuggerTabs.test.tsx (4)
17-28: Well-structured mock response for success scenario.The
mockSuccessResponseobject correctly simulates a successful API response and aligns with theActionResponsetype.
30-41: Well-structured mock response for failure scenario.The
mockFailedResponseobject correctly simulates a failed API response and aligns with theActionResponsetype.
118-144: Good test case for successful response scenario.The test case correctly verifies that the component displays the record count when a successful response is received.
146-172: Good test case for failure response scenario.The test case correctly verifies that the component displays an error message when a failed response is received.
app/client/src/pages/Editor/QueryEditor/QueryDebuggerTabs.tsx (1)
245-257: Effective conditional rendering logic.The conditional rendering logic correctly displays the result count or an error message based on the
isExecutionSuccessproperty, enhancing user feedback.
|
Hi @rohan-arthur , Could you please trigger the CI/CD and assign the reviewer for it. |
|
@raushan3737 please pick issues from this list, as they generally have a clear solution: https://github.com/appsmithorg/appsmith/issues?q=is%3Aopen+is%3Aissue+label%3A%22Inviting+Contribution%22 For this one, would you please attach a video explaining the solution? |
|
Hi @rohan-arthur , I have attached the video explaning the fix and demoing: Video Url Please review and assign the reviewer for it. Thank You. |
…o fix/query-response-error-count
|
This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected. |
|
Hi @rohan-arthur , @NilanshBansal , Could you please review the PR. I have attached the video expaining the fix. |
|
This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected. |
|
Hi @sagar-qa007, Could you please assign the reviewer & get it reviewed this PR. |
|
@raushan3737 do you have any updates on this PR as suggested by @AmanAgarwal041? |
Yes, I have updated the code as per @AmanAgarwal041 suggestion. Please review once. Thank you. |
|
Hey @raushan3737 , there are some client build errors. Can you please update your branch to latest release and check for the build errors ? |
…o fix/query-response-error-count
Updated the code. Please check once. Thank you. |
|
/build-deploy-preview skip-tests=true |
|
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/11046827143. |
|
Deploy-Preview-URL: https://ce-35363.dp.appsmith.com |
|
@raushan3737 Everything seems just prettier fixes : |
|
Hi @AmanAgarwal041, I have fixed the prettier issue. Please check once. Thank you. |
|
@raushan3737 There are some cypress failures. Can you please check ? |
|
@raushan3737 A gentle reminder, we will wait until 17 Oct, and move this back to the backlog if there are no further updates about the cypress failures. |
Yes sure @AmanAgarwal041 apology for the delay. Actually the above cypress is not altered by me & even it is failing with the previous src code also. I have tried to run the cypress with both the code(previous & current PR changes) but it is failing in both cases & oftenly i am getting error after some time as below: Observation:
If possible could you please provide the test method names so that i can investigate further? Thank you. |
|
@raushan3737 The test cases have passed but there seems to be another linting error |
…5363) ### PR Description: - Description: Added the conditional rendering of the record count or error state based on the `isExecutionSuccess` property which is present in props actionResponse. - Attached the video explaning the fix and demoing: [Video Url](https://www.loom.com/share/c40e624688114c1c9c005ab3e8f5de69?sid=bb927dc4-a9a2-476b-861a-26bbffda51b0) - `isExecutionSuccess`: boolean contains the response of the query whether that query was successful or not on the server. - Added the unit test case. Fixes appsmithorg#33813 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced error handling in the Query Debugger, displaying error messages in red when an action fails. - Improved user feedback by conditionally rendering output length based on the success of the action. - **Tests** - Added test cases to ensure correct component behavior for both successful and failed API responses. <!-- end of auto-generated comment: release notes by coderabbit.ai -->










PR Description:
isExecutionSuccessproperty which is present in props actionResponse.isExecutionSuccess: boolean contains the response of the query whether that query was successful or not on the server.Fixes #33813
Summary by CodeRabbit
New Features
Tests