Skip to content

Comments

Add wait time flag instead of hardcoded timeouts#1964

Merged
neel-astro merged 1 commit intomainfrom
add-wait-time-flag
Oct 21, 2025
Merged

Add wait time flag instead of hardcoded timeouts#1964
neel-astro merged 1 commit intomainfrom
add-wait-time-flag

Conversation

@neel-astro
Copy link
Contributor

@neel-astro neel-astro commented Oct 21, 2025

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-time flag for astro deployment create, astro deploy, and astro dbt deploy commands. This would be used alongside the --wait flag 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 test before taking out of draft
  • Ran make lint before 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

@coveralls-official
Copy link

Pull Request Test Coverage Report for Build 06dfac41-e870-4621-b93a-ad7f46b90b80

Details

  • 25 of 35 (71.43%) changed or added relevant lines in 7 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.008%) to 38.506%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cloud/deploy/bundle.go 0 2 0.0%
cmd/cloud/deploy.go 3 5 60.0%
cmd/cloud/deployment.go 6 8 75.0%
cmd/cloud/dbt.go 6 10 60.0%
Files with Coverage Reduction New Missed Lines %
docker/docker.go 2 46.81%
Totals Coverage Status
Change from base Build fb7a283c-f0df-44ee-8870-11e8c84d3767: -0.008%
Covered Lines: 24132
Relevant Lines: 62670

💛 - Coveralls

@neel-astro neel-astro merged commit 64c53a4 into main Oct 21, 2025
4 of 7 checks passed
@neel-astro neel-astro deleted the add-wait-time-flag branch October 21, 2025 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants