This repository was archived by the owner on Aug 2, 2022. It is now read-only.
Repository navigation
Correctly Sanitize git Branch and Tag Names - #8882
Merged
Merged
Conversation
โฆ just the first one
โฆeckout" in the git submodule regression check
3 tasks
kj4ezj
marked this pull request as ready for review
March 25, 2020 22:58
This was referenced Mar 25, 2020
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Change Description
This pull request fixes an edge-case where
gitbranch names with multiple forward-slash characters (/) in the name would cause theDocker - Build and Installstep in Buildkite to fail because the code which sanitizes the branch name before using it in a docker image tag only replaced the first occurrence.I have fixed this by replacing all forward-slash characters with underscore characters, instead of just the first one. I have also dropped any forward-slash which appears at the beginning of a branch name, as this is meaningless and it causes the
git checkoutin theGit Submodule Regression Checkto fail. See this Stack Overflow answer for more details on validgitbranch and tag name syntax.Examples
Here are the builds where we ran into this error:
/feature/fix-spurious-ignition-failures-againas the branch name given to Buildkite/feature/fix-spurious-ignition-failures-again-developas the branch name given to BuildkiteYou can see I intentionally created this pull request with a branch name containing a leading forward-slash, and several more in the middle of the name. Build 21199 passed with
/zach/sanitize/branch/nameas the branch name given to Buildkite.See Also
This set of pull requests all make the same bug fix to different versions of EOSIO:
eos:developeos:release/2.0.xeos:release/1.8.xConsensus Changes
None.
API Changes
None.
Documentation Additions
None.