astronomer / astro-cli

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

Enable turning off development mode for existing deployments #1631

Closed feluelle closed 2 months ago

feluelle commented 2 months ago

Description

We add the --development-mode flag to the deployment update command. Note, that turning on development mode for an existing non-dev deployment is not supported.

🎟 Issue(s)

closes: https://github.com/astronomer/astro-cli/issues/1624

🧪 Functional Testing

List the functional testing steps to confirm this feature or fix.

❯ ./astro deployment update --development-mode disable
Select a Deployment
 #     DEPLOYMENT NAME        RELEASE NAME               DEPLOYMENT ID                 DAG DEPLOY ENABLED     
 1     test-felix-dev         planetoidal-quark-6380     clvdv13iz02ft01o09r19d36h     true                   
 2     test-felix-non-dev     meteoric-pulsar-4873       clvdv1gqp02ep01nffmtio2cq     true                   

> 1
 NAME               NAMESPACE                  CLUSTER     CLOUD PROVIDER     REGION        DEPLOYMENT ID                 RUNTIME VERSION                     DAG DEPLOY ENABLED     CI-CD ENFORCEMENT     DEPLOYMENT TYPE     
 test-felix-dev     planetoidal-quark-6380     N/A         AWS                us-east-1     clvdv13iz02ft01o09r19d36h     11.1.0 (based on Airflow 2.9.0)     true                   false                 STANDARD            

 Successfully updated Deployment
❯ ./astro deployment update --development-mode enable
Select a Deployment
 #     DEPLOYMENT NAME        RELEASE NAME               DEPLOYMENT ID                 DAG DEPLOY ENABLED     
 1     test-felix-dev         planetoidal-quark-6380     clvdv13iz02ft01o09r19d36h     true                   
 2     test-felix-non-dev     meteoric-pulsar-4873       clvdv1gqp02ep01nffmtio2cq     true                   

> 1
Error: Invalid request: Cannot update an existing non-development Deployment to be a development Deployment

📸 Screenshots

Add screenshots to illustrate the validity of these changes.

📋 Checklist

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 90.47619% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 86.75%. Comparing base (eeffcf9) to head (626612a).

Files Patch % Lines
cloud/deployment/deployment.go 84.61% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1631 +/- ## ========================================== - Coverage 86.75% 86.75% -0.01% ========================================== Files 114 114 Lines 16661 16676 +15 ========================================== + Hits 14454 14467 +13 - Misses 1318 1320 +2 Partials 889 889 ```

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