astronomer / astro-cli

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

`astro deployment update <deployment_id> --deployment-file <yamlfile>` is not working with ASTRO_API_TOKEN #1556

Closed abhishekbhakat closed 6 months ago

abhishekbhakat commented 7 months ago

Describe the bug

Unable to update deployment with astro deployment update --deployment-file I verified this and am able to reproduce.

astro deployment inspect <deployment_id> > temp.yaml
astro deployment update <deployment_id> --deployment-file temp.yaml
Error: workspace_name: <workspace name> does not exist in organization: <organization_id>

The only doesn't work with API_TOKEN. But works fine with astro login method.

What CLI Version did you experience this bug?

astro version
Astro CLI Version: 1.23.0

This CLI bug is related to which Astronomer Platform?

What Operating System is the above CLI installed on? Debian/OSX/Windows

🪜 Steps To Reproduce

  1. Create a Deployment API TOKEN.
  2. export the env ASTRO_API_TOKEN with the token.
  3. Fetch the yaml by astro deployment inspect.
  4. Try to update the deployment with the same yaml file.
sunkickr commented 7 months ago

can you check if you still get the error when doing:

astro deployment inspect <deployment_id> > temp.yaml
astro deployment update --deployment-file temp.yaml

You technically don't need to provide the deployment id for the update command. The deployment file is enough

abhishekbhakat commented 7 months ago

Still the same.