-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
fix: Git discarding null properties #25068
fix: Git discarding null properties #25068
Conversation
/build-deploy-preview |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/5454983633. |
Deploy-Preview-URL: https://ce-25068.dp.appsmith.com |
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/5454629105.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don’t see the test cases for this scenario
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/5454957886.
|
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/5454957886. |
…sue-24920/git-discard-null-properties
/ok-to-test |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/5457305023. |
Here is the screen recording of the fixed flow on DP Screen.Recording.2023-07-04.at.11.24.18.PM.movcc: @Parthvi12 @ginilpg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added very minor comment.
...-server/src/test/java/com/appsmith/server/solutions/ImportExportApplicationServiceTests.java
Show resolved
Hide resolved
/ok-to-test |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/5457669634. |
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/5457305023. |
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/5457669634. |
## Description > The git discard flow only discards the properties which were set in the last commit. If the properties are not present in the application json in the last commit and the user changes these properties to some value and after that choose to discard, the changes are not overwritten to null values. > This happens because git uses a function `copyNestedNonNullProperties` to overwrite the values to the last commit ones which ignores the properties if those are null. > This PR explicitly sets the null properties in the target json, so that when the user discards the initially set null properties, these get discarded. #### PR fixes following issue(s) Fixes #24920 #### 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) ## 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 - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#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 (cherry picked from commit 081d417)
Description
PR fixes following issue(s)
Fixes #24920
Media
Type of change
Testing
How Has This Been Tested?
Test Plan
Issues raised during DP testing
Checklist:
Dev activity
QA activity:
Test Plan Approved
label after Cypress tests were reviewedTest Plan Approved
label after JUnit tests were reviewed