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

Stop appveyor building branches that already in PRs #244

Closed
wants to merge 1 commit into from

Conversation

pimterry
Copy link
Contributor

This is the last step to fix #241.

Currently, we build for every PR update (building the PR+master commit) and for every branch push. The branch alone isn't really interesting though, and once a PR is open it'll get built by PR triggers anyway. With this (tiny) change, only that PR build happens, rather than effectively duplicating every build job.

Docs for this option are minimal at best, but appveyor/ci#882 has some background.

@pimterry
Copy link
Contributor Author

For some reason there's two builds on this branch, which I'm not really sure how to interpret. Maybe build notification control is managed by this only once it's on master? ...or maybe it doesn't work?

@Page-
Copy link
Contributor

Page- commented Dec 15, 2016

I expect one build would have been the initial push, before you opened the PR, and the second would be when opening the PR? And only subsequent pushes after opening the PR would be built? I think it's probably worth looking if there's a way to disable building non-master branches altogether unless they are part of a PR, that would avoid any builds of a branch before a PR is opened

@pimterry
Copy link
Contributor Author

@Page- Interesting, ok. That's definitely possible and really easy if it's preferable. That's actually what Juan suggested initially. I'll update this PR to that and see what happens (I think it should build the resulting PR, but not the branch at all - let's find out!)

@Page-
Copy link
Contributor

Page- commented Dec 15, 2016

Yeah, I don't think we care if branches build or not before it gets PRed (it could be pushing as a WIP thing)

Copy link
Contributor

@emirotin emirotin left a comment

Choose a reason for hiding this comment

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

LGTM. Please rebase before merging (it has pulled two older commits because I did squashes in the sdk-browser branch).

@pimterry
Copy link
Contributor Author

@jviotti, @emirotin, @Page-: Sadly, I don't think this actually works.

It's now not building this PR for appveyor at all. I think it'll build when we merge to master, but that's obviously not ok. I'm going to go back to the previous version (build all branches on push, but once they're in PRs only build the PR), since it's strictly better than the current status.

I'd be very interested if anybody thinks they can work out how to configure Appveyor to improve beyond this. One other option I've seen discussed is to change which webhooks reach Appveyor in the first place, to only notify it in the first place for PRs, but I can't see the webhook settings for this repo. Who can? Is there an option in there that would let us turn off push notifications and leave on PR notifications? That would be a good fix instead of this, if it exists.

@emirotin
Copy link
Contributor

I'm fine with either solution as long as it builds on PRs :)
I can't see the hooks settings either, it's for Juan to check.

@jviotti
Copy link
Contributor

jviotti commented Dec 16, 2016

@pimterry I'll get on it. We have Appveyor priority support, so we'll get this sorted ASAP.

@jviotti
Copy link
Contributor

jviotti commented Dec 16, 2016

@pimterry

You can just disable "push" even for AppVeyor's webhook on GitHub web site (repo settings -> Webhooks).

I'll do it myself!

@jviotti
Copy link
Contributor

jviotti commented Dec 16, 2016

Done! Let me know if that works!

Copy link
Contributor

@Page- Page- left a comment

Choose a reason for hiding this comment

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

I'm good with this as an improvement for sure, but if we can find extra ones to add on later that'd be great too :)

@pimterry
Copy link
Contributor Author

Closing this, as @jviotti's change to the hooks themselves solves the problem better by disabling non-PR branch builds altogether (and seems to work very nicely, judging from #245)

@pimterry pimterry closed this Dec 20, 2016
@pimterry pimterry deleted the 241-dedupe-appveyor-builds branch December 20, 2016 18:43
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.

4 participants