Add wait time flag instead of hardcoded timeouts by neel-astro · Pull Request #1964 · astronomer/astro-cli
Description
While adding the --wait flag to the deploy-action, we noticed that at times the default hardcoded timeout can be too small, so we bumped up the defaults and added a flag to set the values to allow users to configure the value in this PR.
Changes:
- Add
--wait-timeflag forastro deployment create,astro deploy, andastro dbt deploycommands. This would be used alongside the--waitflag to set the timeouts, instead of the default values - Bump the defaults to 300 seconds to be on the safer side.
🎟 Issue(s)
Related #XXX
🧪 Functional Testing
Validated that wait timeout works as expected:
❯ ../astro deploy --wait-time=500s --wait -f --dags
Authenticated to astronomer-dev.io
Select a Deployment
# DEPLOYMENT NAME RELEASE NAME DEPLOYMENT ID DAG DEPLOY ENABLED
1 test inductive-torque-5951 cmh080n740omw01qvmpek0a3e true
> 1
Initiating DAG deploy for: cmh080n740omw01qvmpek0a3e
Deployed DAG bundle: 2025-10-21T07:12:28.1809730Z
Deployed Image Tag: 3.1-2
Waiting for the deployment to become healthy…
This may take a few minutes
Deployment test is now healthy
Successfully uploaded DAGs with version 2025-10-21T07:12:28.1809730Z to Astro. Navigate to the Airflow UI to confirm that your deploy was successful.
Access your Deployment:
Deployment View: cloud.astronomer-dev.io/cm7xi0c1604ar01mpuy1pbi63/deployments/cmh080n740omw01qvmpek0a3e
Airflow UI: cm7xhxjm9048m01mppvu90ekx.astronomer-dev.run/dpek0a3e
Validated that shorter wait timeout results in failure:
❯ ../astro deploy --wait-time=5s --wait -f --dags
Authenticated to astronomer-dev.io
Select a Deployment
# DEPLOYMENT NAME RELEASE NAME DEPLOYMENT ID DAG DEPLOY ENABLED
1 test inductive-torque-5951 cmh080n740omw01qvmpek0a3e true
> 1
Initiating DAG deploy for: cmh080n740omw01qvmpek0a3e
Deployed DAG bundle: 2025-10-21T07:11:04.9282601Z
Deployed Image Tag: 3.1-2
Waiting for the deployment to become healthy…
This may take a few minutes
Error: timed out waiting for the Deployment to enter a Healthy state
📸 Screenshots
Add screenshots to illustrate the validity of these changes.
📋 Checklist
- Rebased from the main (or release if patching) branch (before testing)
- Ran
make testbefore taking out of draft - Ran
make lintbefore taking out of draft - Added/updated applicable tests
- Tested against Astro-API (if necessary).
- Tested against Houston-API and Astronomer (if necessary).
- Communicated to/tagged owners of respective clients potentially impacted by these changes.
- Updated any related documentation