astronomer / astro-cli

CLI that makes it easy to create, test and deploy Airflow DAGs to Astronomer
https://www.astronomer.io
Other
341 stars 70 forks source link

Fix secret environment variables being updated with empty string #1618

Closed vandyliu closed 3 months ago

vandyliu commented 3 months ago

Description

Fix secret environment variables being updated. Nil values for existing secret env vars will no longer update the secret variables but keep them with the same value.

๐ŸŽŸ Issue(s)

https://github.com/astronomer/astro-cli/issues/1593

๐Ÿงช Functional Testing

๐Ÿ“ธ Screenshots

Updated the secret variable via ./astro deployment update <deploymentId> --deployment-file deployment.yaml Screenshot 2024-04-11 at 11 30 10โ€ฏAM

Saw on airflow UI that the env var did not get set back to ""

Add screenshots to illustrate the validity of these changes.

๐Ÿ“‹ Checklist

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86.56%. Comparing base (bf3ec8f) to head (5960ad1). Report is 3 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1618 +/- ## ======================================= Coverage 86.56% 86.56% ======================================= Files 114 114 Lines 16087 16087 ======================================= Hits 13925 13925 Misses 1297 1297 Partials 865 865 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.