-
Notifications
You must be signed in to change notification settings - Fork 457
Fix GitHub action webhook errors #786
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
apps/e2e/tests/backend/endpoints/api/v1/integrations/neon/webhooks.test.ts
Show resolved
Hide resolved
😱 Found 2 issues. Time to roll up your sleeves! 😱 🗒️ View all ignored comments in this repo
Need help? Join our Discord for support! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Summary
This PR refactors webhook testing infrastructure to improve CI/CD reliability by addressing GitHub Actions webhook errors. The changes focus on two key areas:
URL Endpoint Standardization: The webhook test URL has been updated from https://example.com
to http://localhost:12345/webhook
, aligning with the existing pattern used throughout the test suite. This change ensures webhook tests work consistently in CI environments where external domain access may be restricted.
Retry Logic Restructuring: The retry mechanism has been moved from findWebhookAttempt
to listWebhookAttempts
, creating a cleaner separation of concerns. The listWebhookAttempts
function now handles the polling logic with up to 20 attempts and 500ms delays, while findWebhookAttempt
focuses solely on filtering results. This architectural improvement makes the webhook testing more predictable and maintainable.
The changes integrate well with the existing e2e testing framework, particularly the niceBackendFetch
utility and webhook testing helpers that are used across multiple test files in the /integrations/neon/
directory.
Confidence score: 4/5
• This PR is quite safe to merge with minimal risk of production issues
• The changes are well-architected improvements to testing infrastructure that don't affect production code
• The apps/e2e/tests/backend/backend-helpers.ts
file should be reviewed to ensure the retry logic handles edge cases properly
1 file reviewed, no comments
Important
Fix webhook handling in tests by updating URLs, adding retry logic, and ensuring correct event handling.
http://localhost:12345/webhook
inbackend-helpers.ts
andwebhooks.test.ts
.listWebhookAttempts()
inbackend-helpers.ts
to handle slow responses.findWebhookAttempt()
inbackend-helpers.ts
to use updatedlistWebhookAttempts()
.webhooks.test.ts
to use local webhook URL for testing.team-memberships.test.ts
to ensure webhook events are captured.team_permission.created
events are correctly handled inteam-memberships.test.ts
.This description was created by
for cfbff54. You can customize this summary. It will automatically update as commits are pushed.