Skip to content

[build] fix CI warnings issued by "git describe"#13098

Merged
lguohan merged 1 commit intosonic-net:masterfrom
guillaumelambert:shallow
Jan 3, 2023
Merged

[build] fix CI warnings issued by "git describe"#13098
lguohan merged 1 commit intosonic-net:masterfrom
guillaumelambert:shallow

Conversation

@guillaumelambert
Copy link
Contributor

@guillaumelambert guillaumelambert commented Dec 18, 2022

./functions.sh script contains twice the command "git describe --tags". Azure pipelines currently retrieves the repository content by using a "git clone" or "git fetch" command with the option "--depth". When the depth is not enough sized to reach a tag in the "git log" history, "git describe --tags" generates on stderr the warning: "fatal: No names found, cannot describe anything."

https://stackoverflow.com/questions/4916492/git-describe-fails-with-fatal-no-names-found-cannot-describe-anything

During the build process, the functions.sh script is a lot consumed and this pointless warning appears in CI thousand lines w/o any added value.
This situation can be easily avoided by redirecting related commands stderr output to /dev/null.

Issue #13106

Which release branch to backport (provide reason below if selected)

all

Description for the changelog

[build] fix CI warnings issued by "git describe"

A picture of a cute animal (not mandatory but encouraged)

//
('>
/rr
*))_

./functions.sh script contains twice the command "git describe --tags".
Azure pipelines currently retrieves the repository content by using a
"git clone" or "git fetch" command with the option "--depth".
When the depth is not enough sized to reach a tag in the "git log"
history,  "git describe --tags" generates on stderr the warning:
"fatal: No names found, cannot describe anything."

https://stackoverflow.com/questions/4916492/git-describe-fails-with-fatal-no-names-found-cannot-describe-anything

During the build process, the functions.sh script is a lot consumed and
this pointless warning appears in CI thousand lines w/o any added value.

This situation can be easily avoided by redirecting related commands
stderr output to /dev/null.

Signed-off-by: Guillaume Lambert <[email protected]>
@lguohan
Copy link
Collaborator

lguohan commented Dec 20, 2022

@xumia , any concern here? changes lgtm.

@xumia
Copy link
Collaborator

xumia commented Dec 21, 2022

Shilong fixed the git describe issue in another PR: #12963, but the change looks good.

@lguohan lguohan merged commit 1c05f66 into sonic-net:master Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants