Fix calculation of $(1)_DEP_PKGS_SHA in Makefile.cache#10764
Merged
saiarcot895 merged 1 commit intosonic-net:masterfrom May 9, 2022
Merged
Fix calculation of $(1)_DEP_PKGS_SHA in Makefile.cache#10764saiarcot895 merged 1 commit intosonic-net:masterfrom
saiarcot895 merged 1 commit intosonic-net:masterfrom
Conversation
In Makefile.cache, for $(1)_DEP_PKGS_SHA, the intention is to include the DEP_MOD_SHA and MOD_HASH of each of the current package's dependencies. However, there's a level of dereferencing missing; instead of grabbing the value of $(dfile)_DEP_MOD_SHA, it is literally using the variable name $(dfile)_DEP_MOD_SHA. This means that the value of this variable will not change when some dependency changes. The impact of this is in transitive dependencies. For a specific example, if there is some change in sairedis, then sairedis will be rebuilt (because there's a change within that component), and swss will be rebuilt (because it's a direct dependency), but docker-swss-layer-buster will not get rebuilt, because only the direct dependencies are effectively being checked, and those aren't changing. Signed-off-by: Saikrishna Arcot <[email protected]>
xumia
approved these changes
May 7, 2022
qiluo-msft
pushed a commit
that referenced
this pull request
May 10, 2022
In Makefile.cache, for $(1)_DEP_PKGS_SHA, the intention is to include the DEP_MOD_SHA and MOD_HASH of each of the current package's dependencies. However, there's a level of dereferencing missing; instead of grabbing the value of $(dfile)_DEP_MOD_SHA, it is literally using the variable name $(dfile)_DEP_MOD_SHA. This means that the value of this variable will not change when some dependency changes. The impact of this is in transitive dependencies. For a specific example, if there is some change in sairedis, then sairedis will be rebuilt (because there's a change within that component), and swss will be rebuilt (because it's a direct dependency), but docker-swss-layer-buster will not get rebuilt, because only the direct dependencies are effectively being checked, and those aren't changing. Signed-off-by: Saikrishna Arcot <[email protected]>
judyjoseph
pushed a commit
that referenced
this pull request
May 16, 2022
In Makefile.cache, for $(1)_DEP_PKGS_SHA, the intention is to include the DEP_MOD_SHA and MOD_HASH of each of the current package's dependencies. However, there's a level of dereferencing missing; instead of grabbing the value of $(dfile)_DEP_MOD_SHA, it is literally using the variable name $(dfile)_DEP_MOD_SHA. This means that the value of this variable will not change when some dependency changes. The impact of this is in transitive dependencies. For a specific example, if there is some change in sairedis, then sairedis will be rebuilt (because there's a change within that component), and swss will be rebuilt (because it's a direct dependency), but docker-swss-layer-buster will not get rebuilt, because only the direct dependencies are effectively being checked, and those aren't changing. Signed-off-by: Saikrishna Arcot <[email protected]>
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.
Signed-off-by: Saikrishna Arcot [email protected]
Why I did it
In
Makefile.cache, for$(1)_DEP_PKGS_SHA, the intention is to includethe
DEP_MOD_SHAandMOD_HASHof each of the current package'sdependencies. However, there's a level of dereferencing missing; instead
of grabbing the value of
$(dfile)_DEP_MOD_SHA, it is literally using thevariable name
$(dfile)_DEP_MOD_SHA. This means that the value of thisvariable will not change when some dependency changes.
The impact of this is in indirect dependencies. For a specific
example, if there is some change in sairedis, then sairedis will be
rebuilt (because there's a change within that component), and swss will
be rebuilt (because it's a direct dependency), but
docker-swss-layer-buster will not get rebuilt, because only the direct
dependencies are effectively being checked, and those aren't changing.
How I did it
Make sure the value of
$(1)_MOD_DEP_PKGS,$(dfile)_DEP_MOD_SHA, and$(dfile)_MOD_HASHare used, not the literal text.Before:
After:
How to verify it
Change the git hash used for the
src/sonic-sairedis/SAIsubmodule, and verify thatdocker-swss-layer-bustergets rebuilt.Note that this also means that PR build times may increase, since indirect dependencies are now properly being checked.
Which release branch to backport (provide reason below if selected)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)