Skip to content

Conversation

@budaesandrei
Copy link

Issue #, if available: N/A

Description of changes:

Added --version flag to create_venvs.py to allow creating virtual environments for a specific Airflow version instead of processing all versions.

Motivation:
When working with a single Airflow version, the script would attempt to create venvs for all versions in images/airflow/, which is time-consuming and can fail if the system Python version is incompatible with older Airflow versions.

Changes:

  • Added --version argument to filter which Airflow version to process
  • Added validation to check if the specified version exists
  • Displays available versions with helpful error message if invalid version is provided
  • Updated README.md

Usage:

# Create venv for only 3.0.6
python3 create_venv.py --target development --version 3.0.6

# Create venvs for all versions (existing behavior)
python3 create_venv.py --target development

Testing:

  • Tested with valid version (3.0.6)
  • Tested with invalid version (displays error and lists available versions)
  • Tested without version flag (processed all versions as before)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

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.

3 participants