Fixes problem with two different files mdsumed with the same name#14998
Merged
Conversation
When we check whether we should rebuild image, we check if the md5sum of some important files changed - which would trigger question whether to rebuild the image or not (because of changed dependencies which need to be installed). This happens for example when package.json or yarn.lock changes. Previously, all the important files had distinct names, so we stored the md5 hashes of those files with just filenames +.md5sum but they were flattened to a single directory. Unfortunately, as of apache#14927 (merged with failing build) we had two package.json and two yarn.locks and it caused overwriting of md5hash of one by the other. This triggered unnecessary rebuilding of the image in CI part which resulted in failure (because of Apache Beam dependency problem). This PR fixes it by adding parent directory to the name of the md5sum file (so we have www-package.json and ui-package.json) now. Those important files change very rarely so this incident should not happen again but we added some comments preventing it.
ashb
approved these changes
Mar 25, 2021
Contributor
|
The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest master at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
feluelle
reviewed
Mar 25, 2021
feluelle
approved these changes
Mar 25, 2021
potiuk
added a commit
that referenced
this pull request
Mar 25, 2021
…4998) * Fixes problem with two different files mdsumed with the same name When we check whether we should rebuild image, we check if the md5sum of some important files changed - which would trigger question whether to rebuild the image or not (because of changed dependencies which need to be installed). This happens for example when package.json or yarn.lock changes. Previously, all the important files had distinct names, so we stored the md5 hashes of those files with just filenames +.md5sum but they were flattened to a single directory. Unfortunately, as of #14927 (merged with failing build) we had two package.json and two yarn.locks and it caused overwriting of md5hash of one by the other. This triggered unnecessary rebuilding of the image in CI part which resulted in failure (because of Apache Beam dependency problem). This PR fixes it by adding parent directory to the name of the md5sum file (so we have www-package.json and ui-package.json) now. Those important files change very rarely so this incident should not happen again but we added some comments preventing it. * Update scripts/ci/libraries/_initialization.sh Co-authored-by: Felix Uellendall <feluelle@users.noreply.github.com> (cherry picked from commit 775ee51)
ashb
pushed a commit
that referenced
this pull request
Apr 15, 2021
…4998) * Fixes problem with two different files mdsumed with the same name When we check whether we should rebuild image, we check if the md5sum of some important files changed - which would trigger question whether to rebuild the image or not (because of changed dependencies which need to be installed). This happens for example when package.json or yarn.lock changes. Previously, all the important files had distinct names, so we stored the md5 hashes of those files with just filenames +.md5sum but they were flattened to a single directory. Unfortunately, as of #14927 (merged with failing build) we had two package.json and two yarn.locks and it caused overwriting of md5hash of one by the other. This triggered unnecessary rebuilding of the image in CI part which resulted in failure (because of Apache Beam dependency problem). This PR fixes it by adding parent directory to the name of the md5sum file (so we have www-package.json and ui-package.json) now. Those important files change very rarely so this incident should not happen again but we added some comments preventing it. * Update scripts/ci/libraries/_initialization.sh Co-authored-by: Felix Uellendall <feluelle@users.noreply.github.com> (cherry picked from commit 775ee51)
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.
When we check whether we should rebuild image, we check if the
md5sum of some important files changed - which would trigger
question whether to rebuild the image or not (because of
changed dependencies which need to be installed). This
happens for example when package.json or yarn.lock changes.
Previously, all the important files had distinct names, so
we stored the md5 hashes of those files with just filenames +.md5sum
but they were flattened to a single directory. Unfortunately,
as of #14927 (merged with failing build) we had two package.json
and two yarn.locks and it caused overwriting of md5hash of one
by the other. This triggered unnecessary rebuilding of the image
in CI part which resulted in failure (because of Apache Beam
dependency problem).
This PR fixes it by adding parent directory to the name of
the md5sum file (so we have www-package.json and ui-package.json)
now. Those important files change very rarely so this incident
should not happen again but we added some comments preventing
it.
^ 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.