Make ES clone target fall back to master #23606
Closed
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.
I've noticed this issue coming up a bunch in the last couple weeks in various channels, so I wanted to explore this option. @tylersmalley had concerns when I first brought it up but I don't remember them exactly, so I thought it'd be nice to have those documented here in GH.
Basic problem is: if you create a branch like elastic/kibana:big-feature, then a few people create small branches that are meant to merge into the feature branch before going to master etc, kibana won't build because of how it tries to find the elasticsearch repo based on your PR branch name and the PR target/base branch name.
Example
PR branch:
jasonrhodes/kibana:add-fun-stuff
PR base/target branch:
elastic/kibana:big-feature
Jenkins build fails, tries to look up the following:
The last line of those logs there will fail because
big-feature
is not a branch on the elastic/elasticsearch repo.The only way to fix this right now is to create a "shadow branch" in your own fork of ES, so I would create
jasonrhodes/elasticsearch:add-fun-stuff
and Jenkins would find that branch on my fork in its first search and use it. This PR just proposes to add one last check if it doesn't find any of these branches anywhere, it falls back toelastic/elasticsearch:master
.If you are doing anything out of the ordinary where you need to test against a specific version of ES, you can then make your shadow branch in your ES fork and it will still work the way it does now, but in what I think is the majority of cases, where a Kibana PR doesn't have corresponding ES changes, the build will "just work".
Thoughts? cc @epixa @tylersmalley (not sure who else should be pinged on this so feel free to add)