Skip to content
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

[ci/stats] fix merge base detection #67030

Merged
merged 5 commits into from
May 27, 2020

Conversation

spalger
Copy link
Contributor

@spalger spalger commented May 19, 2020

Resubmission of #66840

Original description:

When running preliminary reports for the ci-stats we've been collecting I've noticed that the mergeBase we're reporting seems to be off by a considerable amount, I'm not certain but it seems possible the logic which is pulling the latest changes from github is not pulling from the right host, so this attempts to clear that up by not using a named remote and instead use the repo url directly.

Changes:

  • getCheckoutInfo() will always return a branch now, or thrown an error, and that branch name will only contain the actual branch name, never be prefixed with refs/heads/ or origin/.
  • getCheckoutInfo() accepts a branchOverride argument that will allow non-standard jobs to pass something like scmVars.GIT_BRANCH to the method, if that's acceptable based on the job definition.
  • Code that was consuming the GIT_BRANCH environment variable has been updated to expect the variable to just include the branch name, not a ref name or remote/branch pair.

@spalger spalger marked this pull request as ready for review May 19, 2020 16:00
@spalger spalger requested a review from a team as a code owner May 19, 2020 16:00
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@spalger spalger added the release_note:skip Skip the PR/issue when compiling release notes label May 19, 2020
@spalger
Copy link
Contributor Author

spalger commented May 20, 2020

@elasticmachine merge upstream

@brianseeders
Copy link
Contributor

Running on my sandbox to double-check how it works outside of a PR

@spalger
Copy link
Contributor Author

spalger commented May 26, 2020

@elasticmachine merge upstream

@spalger
Copy link
Contributor Author

spalger commented May 26, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@brianseeders brianseeders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, passed on my sandbox

@spalger spalger merged commit 778b01b into elastic:master May 27, 2020
@spalger spalger added v7.8.1 and removed v7.8.0 labels May 27, 2020
spalger added a commit to spalger/kibana that referenced this pull request May 27, 2020
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
spalger added a commit to spalger/kibana that referenced this pull request May 27, 2020
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
spalger added a commit to spalger/kibana that referenced this pull request May 27, 2020
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
spalger added a commit that referenced this pull request May 27, 2020
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
spalger added a commit that referenced this pull request May 27, 2020
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
spalger added a commit that referenced this pull request May 27, 2020
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@spalger spalger deleted the fix/determine-correct-merge-base branch August 18, 2020 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.7.1 v7.8.1 v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants