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

Refactor deployment token cmds #1604

Closed aliotta closed 4 months ago

aliotta commented 4 months ago

Description

My previous PR adding token mgmt commands missed the fact that we already had similar token crud commands for workspace and orgs. This PR removes the commands I added and adds them back using the patterns already established.

๐ŸŽŸ Issue(s)

Related #18928

๐Ÿงช Functional Testing

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

I tested the following scenarios locally against dev

create deployment api token using various optional flags list deployment api token using various optional flags update deployment api token using various optional flags rotate deployment api token using various optional flags delete deployment api token using various optional flags

๐Ÿ“ธ Screenshots

Add screenshots to illustrate the validity of these changes.

๐Ÿ“‹ Checklist

codecov[bot] commented 4 months ago

Codecov Report

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

Project coverage is 86.56%. Comparing base (5df0221) to head (491c4bc). Report is 3 commits behind head on main.

Files Patch % Lines
cloud/deployment/deployment_token.go 87.77% 18 Missing and 15 partials :warning:
cmd/cloud/deployment.go 97.56% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1604 +/- ## ========================================== + Coverage 86.55% 86.56% +0.01% ========================================== Files 114 114 Lines 15935 16071 +136 ========================================== + Hits 13792 13912 +120 - Misses 1288 1297 +9 - Partials 855 862 +7 ```

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