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

Minor fixes for webhooks package & project creation #105

Merged
merged 3 commits into from
Aug 6, 2024

Conversation

shydefoo
Copy link
Contributor

Summary

  • Add errors.go in webhook package to wrap all errors from the webhooks library as a WebhookError
  • This is to enable better error handling, when users are creating or updating their projects when webhooks are enabled.
  • Default numRetries set to 3, this prevents the frontend ui from timing out.
  • The change in this MR will show this error if the ProjectCreatedEvent webhooks did not succeed:
image * For updating projects, this error will appear: image

shydefoo added 2 commits June 25, 2024 16:35
* Webhook errors are now wrapped as WebhookErrors
* This is for better error handling
Copy link

codecov bot commented Jun 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.62%. Comparing base (8a02334) to head (7a09531).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #105      +/-   ##
==========================================
- Coverage   57.14%   56.62%   -0.52%     
==========================================
  Files          47       48       +1     
  Lines        2443     2467      +24     
==========================================
+ Hits         1396     1397       +1     
- Misses        851      874      +23     
  Partials      196      196              
Flag Coverage Δ
api-test 56.62% <ø> (-0.52%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leonlnj
Copy link

leonlnj commented Jun 26, 2024

why did the create project return 1 error while the update show error for all 3 tries? can it show the last attempt error only?

@shydefoo
Copy link
Contributor Author

shydefoo commented Jul 30, 2024

why did the create project return 1 error while the update show error for all 3 tries? can it show the last attempt error only?

Fixed, see https://github.com/caraml-dev/mlp/pull/105/files#diff-6eb77dcc0646ee76d3d6060bdba73719dfafdc221144a670972b655aedbba058R110

Copy link
Contributor

@deadlycoconuts deadlycoconuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀 Thanks for these changes!

@shydefoo shydefoo merged commit 51fce88 into main Aug 6, 2024
8 of 10 checks passed
@shydefoo shydefoo deleted the fix-project-update-context-timeout branch August 6, 2024 01:24
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

Successfully merging this pull request may close these issues.

3 participants