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

AppVeyor doesn't trigger tag build when last commit is not tagged commit #1887

Closed
JustArchi opened this issue Oct 26, 2017 · 3 comments
Closed

Comments

@JustArchi
Copy link

JustArchi commented Oct 26, 2017

This is the issue I stumbled upon several times by now, and it's very easy to reproduce.

Basically I can't trigger tag build (which deploys release in my case) if the "tagged" commit is PR merge commit. Despite of GitHub delivering webhook message, CI build simply does not trigger.

I'm not sure whether this is connected with some specific CI settings or a general issue, but I believe that this is a bug.

For reference, appveyor.yml on which I managed to reproduce the bug looks like this.

In order to reproduce the bug it's enough to open GitHub pull request, merge it using classical PR merge commit (like this), then git tag 1.2.3.4 and git push origin 1.2.3.4. In my case, merge commit builds properly due to building on push, but there is no second build of the same commit triggered by new tag being published.

Of course, as long as I add any other commit on top of it, such as this one, and tag again, then AppVeyor correctly builds one build made from commit being pushed, and another build from tag being published (which in my case also commits deploy).

The issue is based on tagging a commit prior to the one that is a HEAD of the given branch, as further explained in #1887 (comment).

Thank you in advance for looking into this.

@IlyaFinkelshteyn
Copy link
Contributor

This is probably because you have branches: / only: / - master in your YAML, but in webhook tag name is set as a branch. If you send us specific time (in UTC or with time zone) and GitHub delivery id, we can double-check it in our traces.

@JustArchi
Copy link
Author

I also believe that it's because of my specific AppVeyor settings, otherwise you'd catch this issue much earlier.

I compared "broken" tag event with working one on the GitHub itself:

diff

I believe the issue comes from base_ref being null. Now the question is - why is it null, and why it points to the commit before pull request merge, I'm 100% sure I tagged the PR commit itself and not the commit before that... I might want to reproduce this on some clean fork of my repo because I'm no longer sure whether it was my screwup of tagging a commit before, or some black magic going on.

I'll update the issue accordingly once I'm done, I just hope I didn't bother you with nothing if the issue is on my side, thanks for response!

@JustArchi JustArchi changed the title AppVeyor doesn't trigger tag build when last commit is pull request merge AppVeyor doesn't trigger tag build when last commit is not tagged commit Oct 27, 2017
@JustArchi
Copy link
Author

JustArchi commented Oct 27, 2017

After tests it seems that indeed it was my screwup back then, but it uncovered an interesting scenario that perhaps is worth to be fixed anyway.

The bug I've stumbled upon was no build being triggered when tagged commit is not the latest one in the branch, and we're only building that specific branch. In this case, that tag will have base_ref of null like shown above, and the build will not trigger, despite of tag being in fact applied to a given fixed point of time on master branch. AppVeyor even built that commit already as a part of a push event. This basically makes it impossible for tagging older commits when building only given branch.

Is there any interest in fixing this particular scenario? In theory I'd expect AppVeyor to build it, since after all it is a tag applied to master branch, but I have no clue if that's possible to fix easily, since base_ref no longer points to master. If you consider this issue as worth correcting, feel free to left it open, otherwise feel free to close it, since that one is not necessarily my concern anymore 🙂.

Tests for reference:

https://github.com/JustArchi/ArchiSteamFarm-Test/releases/tag/0.0.0.3
https://ci.appveyor.com/project/JustArchi/archisteamfarm-test/history

Thanks for pointing me on the right track.

@JustArchi JustArchi closed this as not planned Won't fix, can't repro, duplicate, stale May 4, 2023
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

No branches or pull requests

2 participants