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

Update build.yml to make git use merge commit #547

Merged
merged 1 commit into from
Mar 16, 2020
Merged

Conversation

dmlloyd
Copy link
Contributor

@dmlloyd dmlloyd commented Mar 16, 2020

No description provided.

@dmlloyd
Copy link
Contributor Author

dmlloyd commented Mar 16, 2020

@radcortez does this make sense to you?

@dmlloyd
Copy link
Contributor Author

dmlloyd commented Mar 16, 2020

The "push" ones are extras because I created the PR using the GUI thus creating a branch on upstream. It would be nice if GitHub let you create the PR with a branch on your own fork, but it doesn't.

@carlosdlr carlosdlr self-requested a review March 16, 2020 13:53
@dmlloyd dmlloyd merged commit 54f571b into master Mar 16, 2020
@dmlloyd dmlloyd deleted the dmlloyd-fix-actions branch March 16, 2020 13:55
@radcortez
Copy link
Contributor

You shouldn't need to do that.

The checkout action uses the $GITHUB_SHA to checkout the code. On a pull_request event this is setup to be:

  • GITHUB_SHA Last merge commit on the GITHUB_REF branch
  • GITHUB_REF PR merge branch refs/pull/:prNumber/merge

@dmlloyd
Copy link
Contributor Author

dmlloyd commented Mar 16, 2020

That's what I thought, but when I looked in the logs, it did not appear to be using the merge SHA - it was checking out the actual branch instead. So....?????

@dmlloyd
Copy link
Contributor Author

dmlloyd commented Mar 16, 2020

I should have captured the logs and put it in the PR.

@radcortez
Copy link
Contributor

Weird. I've just took that out of their documentation:
https://help.github.com/en/actions/reference/events-that-trigger-workflows

Until now, it worked fine in SmallRye Config. So, not sure what is the issue.

@dmlloyd
Copy link
Contributor Author

dmlloyd commented Mar 16, 2020

Yeah it's weird. I checked another older PR and it used the merge commit, but more recent ones did not. I'll see if I can find another example.

@radcortez
Copy link
Contributor

Ah, maybe because the build is only triggered when you push something to the PR. So build was done before your change and you were looking to some old build?

The build doesn't auto run for active PR's if you push stuff to master.

@dmlloyd
Copy link
Contributor Author

dmlloyd commented Mar 16, 2020

It wasn't that it was an outdated commit - it was actually checking out the branch, and naming the checked out branch for the PR's source branch, completely disregarding the merge commit. I wonder if something on the GitHub side was wrong somehow?

@carlosdlr
Copy link

carlosdlr commented Mar 16, 2020

Sorry guys this is to allow for every commit in a PR run the CI or just when this is from a fork merge it to master?
Because in MP fault tolerance we have something similar that allows execute the CI after a commit in a pull request or using @special keyword to be triggered by a comment

@radcortez
Copy link
Contributor

Well, Github as been having some weird issues sometimes.

@dmlloyd
Copy link
Contributor Author

dmlloyd commented Mar 16, 2020

@carlosdlr the idea is to run CI against a merge commit of the PR and master (instead of just running CI on the PR branch itself). The weird thing is that (at least sometimes) CI already does this... but other times it does not? I guess we'll have to keep an eye on it. At some point we can try removing this to see what happens.

@carlosdlr
Copy link

carlosdlr commented Mar 16, 2020

@dmlloyd got it, yes better to keep an eye on this, maybe is coronavirus "bad taste joke" or maybe the are running some maintenance window, but i didn't receive some email about it

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