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

Clarify that X-GitHub-Delivery is unique per event, not per delivery #32822

Open
1 task done
minusworld opened this issue May 6, 2024 · 7 comments
Open
1 task done
Labels
content This issue or pull request belongs to the Docs Content team help wanted Anyone is welcome to open a pull request to fix this issue SME reviewed An SME has reviewed this issue/PR test-create-tracking-issue Creates and links an SME review tracking issue internally webhooks Content related to webhooks

Comments

@minusworld
Copy link

minusworld commented May 6, 2024

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/webhooks/webhook-events-and-payloads#delivery-headers
https://docs.github.com/en/webhooks/using-webhooks/best-practices-for-using-webhooks#use-the-x-github-delivery-header

What part(s) of the article would you like to see updated?

https://docs.github.com/en/webhooks/webhook-events-and-payloads#delivery-headers
https://docs.github.com/en/webhooks/using-webhooks/best-practices-for-using-webhooks#use-the-x-github-delivery-header

Additional information

Hi there!

I was experiencing a puzzling issue for a while where were receiving two webhook event payloads with the same X-GitHub-Delivery GUID. At first, I assumed it was our infrastructure duplicating something because I assumed that all payloads from GitHub would have a unique X-GitHub-Delivery. However, upon further experimentation, I was able to create a scenario which sends two different payloads with the same X-GitHub-Delivery GUID by creating two GitHub Apps. This leads me to believe that X-GitHub-Delivery is unique per GitHub event, not unique per delivery as the documentation implies. Further, this means the guidance in this section is nuanced because there are cases where I want to handle the webhook differently based on which App is sending the event, which means excluding payloads based on X-GitHub-Delivery isn't always valid.

Below are some screenshots showing the same X-GitHub-Delivery from two different GitHub Apps.

1. I created two GitHub Apps to send webhook events to two different callback URLs.

exp-1-installed-2-apps

2. This screenshot shows the same X-GitHub-Delivery GUID routed to two destinations.

Additionally, it shows unique Amazon CloudFront and Amazon Load Balancer IDs for the web request.
exp-2-same-guid-different-dest

3. This screenshot shows the same X-GitHub-Delivery with two different app_ids.

exp-3-same-guid-different-app-ids
@minusworld minusworld added the content This issue or pull request belongs to the Docs Content team label May 6, 2024
Copy link

welcome bot commented May 6, 2024

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label May 6, 2024
@nguyenalex836 nguyenalex836 added waiting for review Issue/PR is waiting for a writer's review webhooks Content related to webhooks and removed triage Do not begin working on this issue until triaged by the team labels May 6, 2024
@nguyenalex836
Copy link
Contributor

@minusworld Thank you for opening this issue! I'll get this triaged for review ✨

@skedwards88 skedwards88 added the needs SME This proposal needs review from a subject matter expert label May 7, 2024
Copy link
Contributor

github-actions bot commented May 7, 2024

Thanks for opening an issue! We've triaged this issue for technical review by a subject matter expert 👀

@skedwards88 skedwards88 added the test-create-tracking-issue Creates and links an SME review tracking issue internally label May 7, 2024
@tiabas
Copy link
Contributor

tiabas commented May 8, 2024

The X-GitHub-Delivery header is indeed only unique per Event and not per delivery. Is a repository had 10 apps listening to the same event, all these apps would receive the same delivery payload for that event.

cc: @skedwards88

@skedwards88
Copy link
Contributor

Thanks for the confirmation, Kevin, and thanks for this detailed and clear issue @minusworld !

You or anyone else is welcome to open a PR to clarify this:

@skedwards88 skedwards88 added help wanted Anyone is welcome to open a pull request to fix this issue SME reviewed An SME has reviewed this issue/PR labels May 9, 2024
@docs-bot docs-bot added this to Help wanted in Docs open source board May 9, 2024
@skedwards88 skedwards88 removed the waiting for review Issue/PR is waiting for a writer's review label May 9, 2024
@nguyenalex836 nguyenalex836 removed the needs SME This proposal needs review from a subject matter expert label May 9, 2024
@dxkf177

This comment was marked as spam.

@dxkf177

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content This issue or pull request belongs to the Docs Content team help wanted Anyone is welcome to open a pull request to fix this issue SME reviewed An SME has reviewed this issue/PR test-create-tracking-issue Creates and links an SME review tracking issue internally webhooks Content related to webhooks
Projects
Development

No branches or pull requests

6 participants
@tiabas @minusworld @skedwards88 @nguyenalex836 @dxkf177 and others