fix: Filtering out empty value env variables from /admin/env API response in backend
Description
This PR is part of adding improvements in /admin/env API - https://github.com/appsmithorg/appsmith/issues/18423 And with that, it fixes main issue which is - https://github.com/appsmithorg/appsmith/issues/17846
When we are sending empty value env variables in /admin/env API response, it's causing incorrect state in toggle buttons (Toggle button gets enabled for empty value variables). Because of which, we were facing incorrect config update issues in Admin settings like Email. As part of fixing that, we are sending only non-empty valued env variables so that frontend interprets it correct.
Fixes https://github.com/appsmithorg/appsmith/issues/18423 https://github.com/appsmithorg/appsmith/issues/17846
Type of change
- Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested?
- Manual - after running appsmith server locally with this change, https://github.com/appsmithorg/appsmith/issues/17846 seems to be resolved
Test Plan
- PENDING, incase required
Issues raised during DP testing
- NA
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
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] 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:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or manual QA
- [ ] Organized project review call with relevant stakeholders after Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
Welcome to the Appsmith community! Thank you for your first pull request and making this project better. 🤗 Please make sure that you raise a review request so your code change does not go unnoticed.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| appsmith | ✅ Ready (Inspect) | Visit Preview | Dec 9, 2022 at 6:02AM (UTC) |
Unable to find test scripts. Please add necessary tests to the PR.
Unable to find test scripts. Please add necessary tests to the PR.
Unable to find test scripts. Please add necessary tests to the PR.
Unable to find test scripts. Please add necessary tests to the PR.
Unable to find test scripts. Please add necessary tests to the PR.
Unable to find test scripts. Please add necessary tests to the PR.
Unable to find test scripts. Please add necessary tests to the PR.
Unable to find test scripts. Please add necessary tests to the PR.
Unable to find test scripts. Please add necessary tests to the PR.
@vivonk : Nirmal, is this change a breaking change? Are we dependent on the FE changes to take this to release?
No, @trishaanand . It's a backend change only. Frontend works fine with this change.
/ok-to-test sha=97c6b83ae2451389b7d162b44e6a984eb9ae3ecd
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3592291019.
Workflow: Appsmith External Integration Test Workflow.
Commit: 97c6b83ae2451389b7d162b44e6a984eb9ae3ecd.
PR: 18430.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=18430&runId=3592291019_1
/ok-to-test sha=87797d94589ce966a06302bad7e3cdcecd995e99
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3627967799.
Workflow: Appsmith External Integration Test Workflow.
Commit: 87797d94589ce966a06302bad7e3cdcecd995e99.
PR: 18430.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=18430&runId=3627967799_1
/ok-to-test sha=430551bcdd69624bda739b9edc8672fba2a20284
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3647550506.
Workflow: Appsmith External Integration Test Workflow.
Commit: 430551bcdd69624bda739b9edc8672fba2a20284.
PR: 18430.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=18430&runId=3647550506_1
/ok-to-test sha=60875903d9053e82aa60d1d8a0bcca99895df902
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3654876555.
Workflow: Appsmith External Integration Test Workflow.
Commit: 60875903d9053e82aa60d1d8a0bcca99895df902.
PR: 18430.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=18430&runId=3654876555_1