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: [server side change only] convert Mongo's form data to raw / native query #10058

Merged
merged 11 commits into from
Apr 1, 2022

Conversation

sumitsum
Copy link
Contributor

@sumitsum sumitsum commented Dec 29, 2021

Description

  • Convert Mongo plugin's form data to Mongo's native query. This translated query will show up if a user switches from form interface to raw input interface as long as the raw interface has not been edited.
  • It stores its result at the following two keys:
    • formData.misc.formToNativeQuery.status: success / error
    • formData.misc.formToNativeQuery.data: translated raw query if status is success or error message if status is error.
  • TBD: Need client side changes to copy over the translated value to the raw command.

Fixes #4880

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • JUnit TC
  • Manual

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

@vercel
Copy link

vercel bot commented Dec 29, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/get-appsmith/appsmith/AkoFmMPAmYZ1Pg391WS1N1LV4NiK
✅ Preview: https://appsmith-git-feature-mongoformtonative4880-get-appsmith.vercel.app

@sumitsum
Copy link
Contributor Author

/ok-to-test sha=6f70e10

@github-actions github-actions bot added the Enhancement New feature or request label Dec 30, 2021
@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/1637243803.
Workflow: Appsmith External Integration Test Workflow.
Commit: 6f70e10.
PR: 10058.

Copy link
Contributor

@nidhi-nair nidhi-nair left a comment

Choose a reason for hiding this comment

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

Hey am I missing something here, where do we use the saved native format for execution?

Also, won't we need a UI designed for the conversion from form to native mode for this change? The way it works today, raw mode is an entirely separate command, and there is no way to switch an update form to raw at all. Let's talk about this a bit.

@github-actions
Copy link

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

@github-actions github-actions bot added the Stale label Jan 10, 2022
@github-actions
Copy link

This PR has been closed because of inactivity.

@github-actions github-actions bot closed this Jan 19, 2022
@sumitsum
Copy link
Contributor Author

Re-opening it since it is under active development. This PR is currently blocked on #10109

@sumitsum sumitsum reopened this Jan 20, 2022
@github-actions github-actions bot removed the Stale label Jan 20, 2022
@github-actions
Copy link

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

@github-actions github-actions bot added the Stale label Jan 31, 2022
@rohan-arthur rohan-arthur added the Query & JS Pod Issues related to the query & JS Pod label Feb 11, 2022
@github-actions
Copy link

This PR has been closed because of inactivity.

@github-actions github-actions bot closed this Feb 19, 2022
@sumitsum sumitsum reopened this Feb 23, 2022
sumitsum added 3 commits April 1, 2022 10:11
minor updates
remove setting formData.body
@sumitsum
Copy link
Contributor Author

sumitsum commented Apr 1, 2022

/ok-to-test sha=55f48cf

@github-actions github-actions bot added Action form Backend This marks the issue or pull request to reference server code Mongo Issues related to Mongo DB plugin labels Apr 1, 2022
@github-actions
Copy link

github-actions bot commented Apr 1, 2022

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/2075844872.
Workflow: Appsmith External Integration Test Workflow.
Commit: 55f48cf.
PR: 10058.

@github-actions
Copy link

github-actions bot commented Apr 1, 2022

UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/2075844872.
Commit: 55f48cf.
Results:

Click to view performance test results

Median Mean SD.Sample SD.Population

@sumitsum sumitsum changed the title feat: convert Mongo's form data to raw / native query feat: [server side changes only] convert Mongo's form data to raw / native query Apr 1, 2022
@sumitsum sumitsum changed the title feat: [server side changes only] convert Mongo's form data to raw / native query feat: convert Mongo's form data to raw / native query Apr 1, 2022
@sumitsum sumitsum changed the title feat: convert Mongo's form data to raw / native query feat: [server side change only] convert Mongo's form data to raw / native query Apr 1, 2022
@mohanarpit mohanarpit merged commit c2f39f4 into release Apr 1, 2022
@mohanarpit mohanarpit deleted the feature/mongo_form_to_native_4880 branch April 1, 2022 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend This marks the issue or pull request to reference server code Enhancement New feature or request Mongo Issues related to Mongo DB plugin Query & JS Pod Issues related to the query & JS Pod Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] [server side change only] Add automatic conversion logic from Mongo form to raw input
5 participants