appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

fix: Filtering out empty value env variables from /admin/env API response in backend

Open vivonk opened this issue 3 years ago • 17 comments

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.

Screenshot 2022-11-24 at 11 06 55 Screenshot 2022-11-24 at 11 07 04

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

vivonk avatar Nov 24 '22 12:11 vivonk

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.

welcome[bot] avatar Nov 24 '22 12:11 welcome[bot]

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)

vercel[bot] avatar Nov 24 '22 12:11 vercel[bot]

Unable to find test scripts. Please add necessary tests to the PR.

github-actions[bot] avatar Nov 24 '22 12:11 github-actions[bot]

Unable to find test scripts. Please add necessary tests to the PR.

github-actions[bot] avatar Nov 24 '22 12:11 github-actions[bot]

Unable to find test scripts. Please add necessary tests to the PR.

github-actions[bot] avatar Nov 24 '22 12:11 github-actions[bot]

Unable to find test scripts. Please add necessary tests to the PR.

github-actions[bot] avatar Nov 24 '22 12:11 github-actions[bot]

Unable to find test scripts. Please add necessary tests to the PR.

github-actions[bot] avatar Nov 24 '22 12:11 github-actions[bot]

Unable to find test scripts. Please add necessary tests to the PR.

github-actions[bot] avatar Nov 24 '22 12:11 github-actions[bot]

Unable to find test scripts. Please add necessary tests to the PR.

github-actions[bot] avatar Nov 25 '22 06:11 github-actions[bot]

Unable to find test scripts. Please add necessary tests to the PR.

github-actions[bot] avatar Nov 25 '22 06:11 github-actions[bot]

Unable to find test scripts. Please add necessary tests to the PR.

github-actions[bot] avatar Nov 25 '22 06:11 github-actions[bot]

@vivonk : Nirmal, is this change a breaking change? Are we dependent on the FE changes to take this to release?

trishaanand avatar Nov 29 '22 05:11 trishaanand

No, @trishaanand . It's a backend change only. Frontend works fine with this change.

vivonk avatar Nov 29 '22 05:11 vivonk

/ok-to-test sha=97c6b83ae2451389b7d162b44e6a984eb9ae3ecd

vivonk avatar Dec 01 '22 11:12 vivonk

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

github-actions[bot] avatar Dec 01 '22 11:12 github-actions[bot]

/ok-to-test sha=87797d94589ce966a06302bad7e3cdcecd995e99

vivonk avatar Dec 06 '22 08:12 vivonk

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

github-actions[bot] avatar Dec 06 '22 08:12 github-actions[bot]

/ok-to-test sha=430551bcdd69624bda739b9edc8672fba2a20284

vivonk avatar Dec 08 '22 10:12 vivonk

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

github-actions[bot] avatar Dec 08 '22 10:12 github-actions[bot]

/ok-to-test sha=60875903d9053e82aa60d1d8a0bcca99895df902

vivonk avatar Dec 09 '22 05:12 vivonk

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

github-actions[bot] avatar Dec 09 '22 05:12 github-actions[bot]