-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix cache related mellanox bullseye build failures #9234
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,12 +19,15 @@ SHELL = /bin/bash | |
.SHELLFLAGS += -e | ||
|
||
MAIN_TARGET = issu-version | ||
BULLSEYE_FILES_PATH = /sonic/target/files/bullseye | ||
BUSTER_FILES_PATH = /sonic/target/files/buster | ||
|
||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : | ||
ifneq (,$(findstring buster,$(DEST))) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this rule depends on Debian version? #Pending There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not on the debian version but what is currently being built. If buster is being built it executes the program which exports the contents of the If bullseye is being built it doesn't have access to this utility so it copies from the buster targets (which has already been built) to itself. We do this so that we have the file available in both the buster and bullseye slave docker at build time and that both targets are correctly recognized by the build system and cached correctly. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the reason of "If bullseye is being built it doesn't have access to this utility"? Any plan to have the utility (what is it?) in future? I am wondering if you can make this Makefile not depends on any Debian versions, it should work for Buster, and any future Debian versions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You assume build order of Buster/Bullseye. Could you be explicit. I understand this PR is a temporary solution, and after SDK support Bullseye, all the Debian version dependency will be removed. |
||
sx_sdk --version | egrep -o 'ISSU [0-9]+' > $(DEST)/$(MAIN_TARGET) || { | ||
echo "ISSU version is undefined: $(sx_sdk --version)" | ||
rm $(DEST)/$(MAIN_TARGET) | ||
exit 1 | ||
} | ||
cp $(DEST)/$(MAIN_TARGET) $(BULLSEYE_FILES_PATH)/$(MAIN_TARGET) | ||
else | ||
cp $(BUSTER_FILES_PATH)/$(MAIN_TARGET) $(DEST)/$(MAIN_TARGET) | ||
endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : | |
wget -O $(MFT_TGZ) http://www.mellanox.com/downloads/MFT/$(MFT_TGZ) | ||
tar xzf $(MFT_TGZ) | ||
|
||
ifeq ($(BLDENV), bullseye) | ||
ifneq (,$(findstring bullseye,$(DEST))) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you explain this change? #Pending There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, this checks if the target is bullseye or buster by looking at the destination path for the target. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. your code is only check bullseye? How it is different with original code? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BLDENV is not exported to Makefiles, thus this was not functioning. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. However I notice is largely used by many other makefile. Is it something missing in build infra? |
||
pushd $(MFT_NAME)/SDEBS | ||
|
||
# put a lock here because dpkg does not allow installing packages in parallel | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering what is the DEPENDS for debian version before buster and after buster? #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please elaborate on your question?
This line exists because this only depends on APPLIBS when the build environment is buster (when it is actually generating the issu_version file)
Otherwise it will try to compile the mellanox sdk for bullseye (which it is not ready to do right now)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to double check: you mean issu_version only exists in Buster, Not in Bulleyes and later, not in Stretch and earlier versions?