Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

airflow_db_cleanup.py Version check logic doesn't work for Airflow 2.10.x and above. #13288

Open
miguelars23 opened this issue Apr 3, 2025 · 1 comment
Assignees
Labels
samples Issues that are directly related to samples.

Comments

@miguelars23
Copy link

Splitting AIRFLOW_VERSION as an arrange of Strings and comparing it like this:

if AIRFLOW_VERSION < ["2", "2", "0"]

won't work for versions 2.10.x and above as Python evaluates "10" < "2" to true. Converting the strings to integers could be the easiest way to workaround this issue.

Example line:

https://github.com/GoogleCloudPlatform/python-docs-samples/blob/89ad8f0a27dec5f5ca888ec1e7597ecbf0888f2c/composer/workflows/airflow_db_cleanup.py#L109C6-L109C45

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Apr 3, 2025
@iennae
Copy link
Contributor

iennae commented Apr 4, 2025

@miguelars23 thank you for reporting this. We'll investigate.

@eapl-gemugami eapl-gemugami self-assigned this Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
samples Issues that are directly related to samples.
Projects
None yet
Development

No branches or pull requests

3 participants