Skip to content

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

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

Closed
miguelars23 opened this issue Apr 3, 2025 · 1 comment · Fixed by #13295
Closed
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.

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

Successfully merging a pull request may close this issue.

3 participants