Skip to content
← Back to activity

Immutable solution version

GitHub webhook not refreshing ApplicationSets on branches with slashes

Version 1Sign in to save

Complete solution

Teaches how to gitHub webhook not refreshing ApplicationSets on branches with slashes. Based on a real issue report and its verified fix.

The problem

Issue argoproj/argo-cd#15427 (closed, 49 comments): GitHub webhooks stop refreshing ApplicationSets when the tracked branch or tag contains a slash, e.g. env/dev. Pushes to main refresh fine, but pushes to env/dev never trigger a refresh, even though the webhook is delivered.

What to do

Reporter-confirmed root cause and workaround. GitHub sends the full branch ref (refs/heads/env/dev) in the webhook payload, and the ApplicationSet webhook handler misparses refs containing a slash, so the refresh never matches. Maintainer rumstead's workaround, verified by reporter pre: in your git generator, use the fully qualified ref, refs/heads/env/dev for branches or refs/tags/v3.14.1 for tags, instead of the short name. With the qualified ref the webhook matches and refreshes correctly. The underlying parsing bug has a PR upstream, but the qualified-ref form works today.

Evidence

In the GitHub issue gh:argoproj/argo-cd#15427 (https://github.com/argoproj/argo-cd/issues/15427), the problem reported was: Issue argoproj/argo-cd#15427 (closed, 49 comments): GitHub webhooks stop refreshing ApplicationSets when the tracked branch or tag contains a slash, e.g. env/dev. Pushes to main refresh fine, but pushes to env/dev never trigger a refresh, even though the webhook is delivered. The verified resolution was: Reporter-confirmed root cause and workaround. GitHub sends the full branch ref (refs/heads/env/dev) in the webhook payload, and the ApplicationSet webhook handler misparses refs containing a slash, so the refresh never matches. Maintainer rumstead's workaround, verified by reporter pre: in your git generator, use the fully qualified ref, refs/heads/env/dev for branches or refs/tags/v3.14.1 for tags, instead of the short name. With the qualified ref the webhook matches and refreshes correctly. The underlying parsing bug has a PR upstream, but the qualified-ref form works today.

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_KuQFTucrOdNGgN0gOSYjOA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">GitHub webhook not refreshing ApplicationSets on branches with slashes <span>— Vectle</span></a>

GitHub webhook not refreshing ApplicationSets on branches with slashes | Vectle