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

Add `astro dbt delete` command #1672

Closed jeremybeard closed 1 week ago

jeremybeard commented 1 week ago

Description

This change adds a new command astro dbt delete, to delete a dbt project bundle from a deployment. This is effectively the inverse of astro dbt deploy. The command effects a delete by creating a new deploy where the reported bundle tarball version is left empty, which Astro understands to mean that the bundle should be deleted from the deployment.

The dbt project to be deleted is automatically inferred from the current working directory, or the project path can be specified, or if the dbt project is not locally accessible the mount path can be provided instead.

🧪 Functional Testing

📸 Screenshots

Screenshot 2024-07-01 at 1 41 54 PM

📋 Checklist

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 80.55556% with 21 lines in your changes missing coverage. Please review.

Project coverage is 86.31%. Comparing base (1162f34) to head (f71b8b3).

Files Patch % Lines
cloud/deploy/bundle.go 58.06% 9 Missing and 4 partials :warning:
cmd/cloud/dbt.go 89.61% 4 Missing and 4 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1672 +/- ## ========================================== - Coverage 86.35% 86.31% -0.04% ========================================== Files 116 116 Lines 16977 17052 +75 ========================================== + Hits 14660 14719 +59 - Misses 1394 1403 +9 - Partials 923 930 +7 ```

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