Skip to content

Conversation

@ephraimbuddy
Copy link
Contributor

@ephraimbuddy ephraimbuddy commented Dec 6, 2021

The airflow db check-migrations command is missing a migration wait timeout
value in the helm chart resulting in unexpected failures at times.

This PR adds a default timeout to the command


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

@boring-cyborg boring-cyborg bot added the area:helm-chart Airflow Helm Chart label Dec 6, 2021
@potiuk
Copy link
Member

potiuk commented Dec 6, 2021

Question - what woudl be the cases where timing out on migration is "wrong" ? Wouls not that leave the DB in a state that is not expected ? However I think that one is fine to merge as long as we merge #18439 - because then instead of "hanging" migration you'd get hard failure (which is much better).

Is that the idea behind it ?

@ephraimbuddy
Copy link
Contributor Author

ephraimbuddy commented Dec 6, 2021

Question - what woudl be the cases where timing out on migration is "wrong" ? Wouls not that leave the DB in a state that is not expected ? However I think that one is fine to merge as long as we merge #18439 - because then instead of "hanging" migration you'd get hard failure (which is much better).

Is that the idea behind it ?

Actually, there was a timeout in the helm chart until this change: bced2d7 (which is not released yet). So now, it doesn't wait for migration like before.
I added default=60 in the cli_parser but I can remove it if we want. I feel there would be no harm since it's just for checking migrations and would exit once the check is alright

@potiuk
Copy link
Member

potiuk commented Dec 6, 2021

Ah I see. But I hope #18439 could be also merged, that would help A LOT in a meaningful message to the user if the timeout actually happens. Or is timeout equivalent with "error" of the wait-for migration init container andr results with "error" ?

The `airflow db check-migrations` command is missing a migration wait timeout
value in the helm chart resulting in unexpected failures at times.

This PR adds a default timeout to the command
@ephraimbuddy ephraimbuddy force-pushed the add-default-migration-timeout branch from 2492954 to a01800e Compare December 6, 2021 13:05
@ephraimbuddy
Copy link
Contributor Author

Ah I see. But I hope #18439 could be also merged, that would help A LOT in a meaningful message to the user if the timeout actually happens. Or is timeout equivalent with "error" of the wait-for migration init container andr results with "error" ?

This, #18439 sadly doesn't get hit due to the TimeoutError as I observed. I'm taking a look at fixing it

@github-actions
Copy link

github-actions bot commented Dec 6, 2021

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Dec 6, 2021
@ephraimbuddy ephraimbuddy merged commit 12c916c into apache:main Dec 6, 2021
@ephraimbuddy ephraimbuddy deleted the add-default-migration-timeout branch December 6, 2021 19:03
@ephraimbuddy ephraimbuddy added this to the Airflow Helm Chart 1.4.0 milestone Dec 6, 2021
@jedcunningham jedcunningham added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:helm-chart Airflow Helm Chart changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) okay to merge It's ok to merge this PR as it does not require more tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants