Improve handling of CI image timeout when backtracking#33364
Merged
Conversation
potiuk
requested review from
Lee-W,
amoghrajesh,
eladkal,
ephraimbuddy,
hussein-awala and
uranusjr
August 13, 2023 10:57
Member
Author
potiuk
force-pushed
the
add-backtracking-tool
branch
from
August 13, 2023 11:03
3d61e46 to
104b740
Compare
Member
Author
|
Corrected a small mistake in the instructions above: Instead of "When it stops succeeding" : "When it still succeeds but you have one candidate only, you found the culprit." |
potiuk
commented
Aug 13, 2023
Member
Author
There was a problem hiding this comment.
This part is removed from PROD image because EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS is. only used in CI image.
potiuk
commented
Aug 13, 2023
potiuk
force-pushed
the
add-backtracking-tool
branch
5 times, most recently
from
August 14, 2023 06:31
a58e4c7 to
b7a4c94
Compare
Even the latest pip can enter into a long loop of backtracking when trying to find latest "good" set of dependencies with eager upgrade. This happened on August 10th 2023 with aiobotocore causing backtracking. This PR adds a complete set of tools and instructions that can help in such cases and figure out which newly released dependency causes backtracking. The toolset consists of: * adding timeout on the image build, so that it can fail before the job timeout and provide useful instructions what to do * adding `ci find-backtracking-candidates` that allows to identify the packages released after the last successful constraint update that could be the reason for backtracking * running the `find-backtracking-candidates` command in the CI when timeout occurs - this will help to see the candidates as early as possible - at the first build that will fail with timeout. This should help with narrowing down the root cause much faster * adding detailed explanation why we have the problem and how to deal with it step-by-step, including example based on the August 2023 backtracking issue with aiobotocore * finally removing `--empty-image` switch and pushing empty images in CI. This was an attempt to speed up waiting for image in case the image failed, but what it did, it has hidden the failures of the images when they failed. It does not really add value any more, since "image waiting" is now always done using small public runners, waiting till timeout for those is not a big issue.
potiuk
force-pushed
the
add-backtracking-tool
branch
from
August 14, 2023 06:36
b7a4c94 to
00218db
Compare
Member
Author
|
Applied comment + rebased. |
uranusjr
approved these changes
Aug 14, 2023
hussein-awala
approved these changes
Aug 14, 2023
Lee-W
approved these changes
Aug 14, 2023
potiuk
added a commit
to potiuk/airflow
that referenced
this pull request
Aug 14, 2023
The change apache#33364 removed accidentally --builder command that has been used in CI to build image cache. This PR restores it and also moves it to the "cache" option group where it belongs.
potiuk
added a commit
that referenced
this pull request
Aug 14, 2023
potiuk
added a commit
that referenced
this pull request
Aug 14, 2023
The canary builds continued failing after fixing aibotocore in #33364 when aiobotocore dependency limit dependency limit. This was because the main build is now using "empty" eager upgrade requirements which override the embedded aiobotocore and continue trigger backtracking. This is not easily visible on CI because the backtracking error is under a folded CI image build group in CI. This PR fixes both: * only overrides eager requirements if they are not empty * make sure that eager upgrade output is in the unfolded output of CI job
potiuk
added a commit
that referenced
this pull request
Aug 14, 2023
The canary builds continued failing after fixing aibotocore in #33364 when aiobotocore dependency limit dependency limit. This was because the main build is now using "empty" eager upgrade requirements which override the embedded aiobotocore and continue trigger backtracking. This is not easily visible on CI because the backtracking error is under a folded CI image build group in CI. This PR fixes both: * only overrides eager requirements if they are not empty * make sure that eager upgrade output is in the unfolded output of CI job
ephraimbuddy
pushed a commit
that referenced
this pull request
Aug 15, 2023
Even the latest pip can enter into a long loop of backtracking when trying to find latest "good" set of dependencies with eager upgrade. This happened on August 10th 2023 with aiobotocore causing backtracking. This PR adds a complete set of tools and instructions that can help in such cases and figure out which newly released dependency causes backtracking. The toolset consists of: * adding timeout on the image build, so that it can fail before the job timeout and provide useful instructions what to do * adding `ci find-backtracking-candidates` that allows to identify the packages released after the last successful constraint update that could be the reason for backtracking * running the `find-backtracking-candidates` command in the CI when timeout occurs - this will help to see the candidates as early as possible - at the first build that will fail with timeout. This should help with narrowing down the root cause much faster * adding detailed explanation why we have the problem and how to deal with it step-by-step, including example based on the August 2023 backtracking issue with aiobotocore * finally removing `--empty-image` switch and pushing empty images in CI. This was an attempt to speed up waiting for image in case the image failed, but what it did, it has hidden the failures of the images when they failed. It does not really add value any more, since "image waiting" is now always done using small public runners, waiting till timeout for those is not a big issue. (cherry picked from commit 1cf960d)
ephraimbuddy
pushed a commit
that referenced
this pull request
Aug 15, 2023
ephraimbuddy
pushed a commit
that referenced
this pull request
Aug 15, 2023
The canary builds continued failing after fixing aibotocore in #33364 when aiobotocore dependency limit dependency limit. This was because the main build is now using "empty" eager upgrade requirements which override the embedded aiobotocore and continue trigger backtracking. This is not easily visible on CI because the backtracking error is under a folded CI image build group in CI. This PR fixes both: * only overrides eager requirements if they are not empty * make sure that eager upgrade output is in the unfolded output of CI job (cherry picked from commit 3857d33)
ferruzzi
pushed a commit
to aws-mwaa/upstream-to-airflow
that referenced
this pull request
Aug 17, 2023
Even the latest pip can enter into a long loop of backtracking when trying to find latest "good" set of dependencies with eager upgrade. This happened on August 10th 2023 with aiobotocore causing backtracking. This PR adds a complete set of tools and instructions that can help in such cases and figure out which newly released dependency causes backtracking. The toolset consists of: * adding timeout on the image build, so that it can fail before the job timeout and provide useful instructions what to do * adding `ci find-backtracking-candidates` that allows to identify the packages released after the last successful constraint update that could be the reason for backtracking * running the `find-backtracking-candidates` command in the CI when timeout occurs - this will help to see the candidates as early as possible - at the first build that will fail with timeout. This should help with narrowing down the root cause much faster * adding detailed explanation why we have the problem and how to deal with it step-by-step, including example based on the August 2023 backtracking issue with aiobotocore * finally removing `--empty-image` switch and pushing empty images in CI. This was an attempt to speed up waiting for image in case the image failed, but what it did, it has hidden the failures of the images when they failed. It does not really add value any more, since "image waiting" is now always done using small public runners, waiting till timeout for those is not a big issue.
ferruzzi
pushed a commit
to aws-mwaa/upstream-to-airflow
that referenced
this pull request
Aug 17, 2023
The change apache#33364 removed accidentally --builder command that has been used in CI to build image cache. This PR restores it and also moves it to the "cache" option group where it belongs.
ferruzzi
pushed a commit
to aws-mwaa/upstream-to-airflow
that referenced
this pull request
Aug 17, 2023
The canary builds continued failing after fixing aibotocore in apache#33364 when aiobotocore dependency limit dependency limit. This was because the main build is now using "empty" eager upgrade requirements which override the embedded aiobotocore and continue trigger backtracking. This is not easily visible on CI because the backtracking error is under a folded CI image build group in CI. This PR fixes both: * only overrides eager requirements if they are not empty * make sure that eager upgrade output is in the unfolded output of CI job
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Even the latest pip can enter into a long loop of backtracking when trying to find latest "good" set of dependencies with eager upgrade. This happened on August 10th 2023 with aiobotocore causing backtracking.
This PR adds a complete set of tools and instructions that can help in such cases and figure out which newly released dependency causes backtracking.
The toolset consists of:
adding timeout on the image build, so that it can fail before the job timeout and provide useful instructions what to do
adding
ci find-backtracking-candidatesthat allows to identify the packages released after the last successful constraint update that could be the reason for backtrackingrunning the
find-backtracking-candidatescommand in the CI when timeout occurs - this will help to see the candidates as early as possible - at the first build that will fail with timeout. This should help with narrowing down the root cause much fasteradding detailed explanation why we have the problem and how to deal with it step-by-step, including example based on the August 2023 backtracking issue with aiobotocore
finally removing
--empty-imageswitch and pushing empty images in CI. This was an attempt to speed up waiting for image in case the image failed, but what it did, it has hidden the failures of the images when they failed. It does not really add value any more, since "image waiting" is now always done using small public runners, waiting till timeout for those is not a big issue.^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an 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 a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.