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

TESTING EXTERNAL SCRIPT: external merge request from Contributor #35936

Closed
wants to merge 2 commits into from

Conversation

AmanAgarwal041
Copy link
Contributor

@AmanAgarwal041 AmanAgarwal041 commented Aug 28, 2024

Description

Fixes #28190

Warning

If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.

Automation

/ok-to-test tags=@tag.All

🔍 Cypress test results

Caution

If you modify the content in this section, you are likely to disrupt the CI result for your PR.

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Enhanced the data structure for results in the datasource trigger functionality, allowing for clearer representation of data as key-value pairs.
    • Implemented case-insensitive sorting of results based on labels for consistent output.
  • Tests

    • Added a new test to validate the order of collections returned by the datasource trigger, ensuring correctness in data retrieval operations.

Copy link
Contributor

coderabbitai bot commented Aug 28, 2024

Warning

Rate limit exceeded

@github-actions[bot] has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 26 minutes and 48 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between 4885337 and a470408.

Walkthrough

The changes involve enhancements to the DatasourceTriggerSolutionCEImpl class, specifically updating the trigger method to utilize a list of maps for improved data representation and added sorting functionality. Additionally, a new test method is introduced to ensure the correct ordering of collections returned by the datasource trigger, aligning the implementation with specified requirements.

Changes

Files Change Summary
app/server/appsmith-server/src/main/java/com/appsmith/server/solutions/ce/DatasourceTriggerSolutionCEImpl.java Modified the trigger method to change the result type to List<Map<String, String>>, added sorting logic for case-insensitive ordering of labels. Updated the return statement to match previous output format.
app/server/appsmith-server/src/test/java/com/appsmith/server/solutions/DatasourceTriggerSolutionTest.java Added a new test method datasourceTriggerTest_should_return_collections_inorder to validate the order of collections returned by the datasource trigger.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant DatasourceTriggerSolution
    participant PluginExecutorHelper
    participant DatasourceStructureSolution

    User->>DatasourceTriggerSolution: Trigger method call
    DatasourceTriggerSolution->>PluginExecutorHelper: Get structure of the datasource
    PluginExecutorHelper-->>DatasourceTriggerSolution: Return datasource structure
    DatasourceTriggerSolution->>DatasourceStructureSolution: Retrieve table and column information
    DatasourceStructureSolution-->>DatasourceTriggerSolution: Return table and column data
    DatasourceTriggerSolution->>DatasourceTriggerSolution: Sort results by label
    DatasourceTriggerSolution-->>User: Return sorted results
Loading

Assessment against linked issues

Objective Addressed Explanation
Improve experience of selecting collections (Issue #28190)
Ensure collection order is maintained (Issue #35842)

Poem

In the realm of data, a change unfolds,
Sorting collections, a tale to be told.
From chaos to order, the labels align,
With tests that ensure the results are divine.
A seamless experience, for users to gain,
In the land of Appsmith, enhancements remain! ✨


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added Enhancement New feature or request Integrations Product Issues related to a specific integration Mongo Issues related to Mongo DB plugin Query & JS Pod Issues related to the query & JS Pod and removed Enhancement New feature or request labels Aug 28, 2024
@AmanAgarwal041 AmanAgarwal041 deleted the chore/external-contribution-35413 branch August 28, 2024 10:11
@github-actions github-actions bot added Enhancement New feature or request and removed Enhancement New feature or request labels Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Integrations Product Issues related to a specific integration Mongo Issues related to Mongo DB plugin Query & JS Pod Issues related to the query & JS Pod
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Mongo collections dropdown filtering
2 participants