Skip to content

Comments

Add remote execution support in astro dev init#1931

Merged
feluelle merged 2 commits intomainfrom
remote-dev-init
Oct 7, 2025
Merged

Add remote execution support in astro dev init#1931
feluelle merged 2 commits intomainfrom
remote-dev-init

Conversation

@jaketf
Copy link
Contributor

@jaketf jaketf commented Sep 4, 2025

Description

Describe the purpose of this pull request.

depends on: https://github.com/astronomer/astro-agent/pull/777

adds a --remote-execution-enabled flag to the astro dev init command that will prompt the user for a remote repository URL generate extra project files, notably:

  • Dockerfile.client
  • requirements-client.txt
  • packages-client.txt
  • an entry in .astro/config to store the remote client image repository

adds a --remote-image-repository flag. If not passed, the user will be interactively prompted to specify this with a warning that they will not be able to deploy until this is configured.

🎟 Issue(s)

closes #1928

🧪 Functional Testing

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

jake@Jakes-MacBook-Pro astro-cli % make build  
go build -o astro -ldflags "-X github.com/astronomer/astro-cli/version.CurrVersion=SNAPSHOT-a7d785bb" main.go

jake@Jakes-MacBook-Pro astro-cli % mkdir -p test-proj

jake@Jakes-MacBook-Pro astro-cli % cd test-proj 

jake@Jakes-MacBook-Pro test-proj % ../astro dev init --remote-execution-enabled
Enter the remote Docker repository for the client image (leave blank if not known
but you will not be able to use the Astro CLI to deploy the image until configured)
Remote client image repository endpoint (e.g. quay.io/acme/my-deployment-image): quay.io/acme/my-deployment-image
If you want to modify the remote repository down the line, use the `astro config set <config-name> <config-value>` command while being inside the local project
Initialized empty Astro project in /Users/jake/astro-cli/test-proj

jake@Jakes-MacBook-Pro test-proj % tree -a
.
├── .astro
│   ├── config.yaml
│   ├── dag_integrity_exceptions.txt
│   └── test_dag_integrity_default.py
├── .dockerignore
├── .env
├── .gitignore
├── airflow_settings.yaml
├── dags
│   ├── .airflowignore
│   └── exampledag.py
├── Dockerfile
├── Dockerfile.client
├── include
├── packages-client.txt
├── packages.txt
├── plugins
├── README.md
├── requirements-client.txt
├── requirements.txt
└── tests
    └── dags
        └── test_dag_example.py

7 directories, 17 files
jake@Jakes-MacBook-Pro test-proj % cat Dockerfile.client
FROM images.astronomer.cloud/baseimages/astro-remote-execution-agent:3.0-10-python3.10-base

jake@Jakes-MacBook-Pro test-proj % cat packages-client.txt 
# Add client-specific OS packages here

jake@Jakes-MacBook-Pro test-proj % cat requirements-client.txt
# Add client-specific Python packages here

jake@Jakes-MacBook-Pro test-proj % cat .astro/config.yaml 
project:
    name: test-proj
remote:
    client_registry: quay.io/acme/my-deployment-image

📸 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

@jaketf jaketf marked this pull request as draft September 4, 2025 20:38
@feluelle feluelle force-pushed the remote-dev-init branch 2 times, most recently from 9582921 to a10fb43 Compare October 7, 2025 07:53
@feluelle feluelle changed the title Add --remote-execution-enabled support in astro dev init Add remote execution support in astro dev init Oct 7, 2025
@coveralls-official
Copy link

coveralls-official bot commented Oct 7, 2025

Pull Request Test Coverage Report for Build 0b79ae96-5cf2-44fc-9b53-56bb7806af87

Details

  • 141 of 163 (86.5%) changed or added relevant lines in 7 files are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.1%) to 38.418%

Changes Missing Coverage Covered Lines Changed/Added Lines %
airflow_versions/http_client.go 9 12 75.0%
cmd/airflow.go 54 62 87.1%
airflow_versions/airflow_versions.go 69 80 86.25%
Files with Coverage Reduction New Missed Lines %
cmd/airflow.go 1 91.09%
docker/docker.go 2 46.81%
Totals Coverage Status
Change from base Build 749c30b6-5e3d-48ab-9e7d-a8679049ec15: 0.1%
Covered Lines: 24026
Relevant Lines: 62538

💛 - Coveralls

@feluelle feluelle force-pushed the remote-dev-init branch 2 times, most recently from 5a53a8a to 20f4afc Compare October 7, 2025 10:51
- add `--remote-execution-enabled` flag
- add `--remote-image-repository` flag

Co-authored-by: Jake Ferriero <[email protected]>
Copy link
Contributor

@neel-astro neel-astro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left some minor comments, but otherwise LGTM

@feluelle feluelle marked this pull request as ready for review October 7, 2025 16:44
@feluelle feluelle merged commit 0f76958 into main Oct 7, 2025
5 of 6 checks passed
@feluelle feluelle deleted the remote-dev-init branch October 7, 2025 17:21
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.

Add support for remote deployment setup in astro dev init

3 participants