Gitlab webhook tag push events are ignored when source target revision is a Semver constraint #21634
Open
3 tasks done
Labels
bug
Something isn't working
Checklist:
argocd version
.Describe the bug
When using tag tracking with a SemVer constraint in an Application source, if using a Gitlab webhook, then tag push events for new tags which match the constraint do not trigger a resync of the Application.
To Reproduce
Expected behavior
The Application should sync to revision "1.1.0" almost immediately after the webhook has fired.
Version
Logs
We see acknowledgement that the webhook was received, eg
but there are no further log messages after that (so, for example, there have been no errors logged).
Suspected Root Cause
I suspect the cause is in the
sourceRevisionHasChanged
method inutil/webhook/webhook.go
. For tag push events therevision
parameter is coming through as the new tag name, but the method (apart from a bit of edge case handling) is essentially just doing a string equality check between this and the source's target revision. This will obviously fail when the revision is something like1.1.0
but the target revision is1.*
. Instead, in the event the equality check fails, it ought to additionally try doing a semver constraint check, eg something like the example here.If this is the underlying cause then the fact we saw this specifically with Gitlab webhooks is likely irrelevant, and I'm guessing the same issue will be seen with other SCM providers' webhooks.
The text was updated successfully, but these errors were encountered: