-
Notifications
You must be signed in to change notification settings - Fork 18
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
fix: init webhook validation check #117
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #117 +/- ##
==========================================
+ Coverage 56.39% 56.75% +0.35%
==========================================
Files 48 48
Lines 2477 2479 +2
==========================================
+ Hits 1397 1407 +10
+ Misses 884 878 -6
+ Partials 196 194 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
LGTM !
Thank you for the review @tiopramayudi! |
# Description Previously on #601 I added webhook for model version endpoint related event, and in here the event will be expanded into a model, model endpoint, model version related event, as we also want to have an action (from other service) to be triggered if these events happen. # Modifications <!-- Summarize the key code changes. --> - created another package for webhook interface - add event for: - model created - model endpoint created/updated/deleted - model version created/updated/deleted - change previous event name of `on-model-version-*` to `on-version-endpoint-*` # Tests # Checklist - [x] Added PR label - [x] Added unit test, integration, and/or e2e tests - [x] Tested locally - [ ] Updated documentation - [ ] Update Swagger spec if the PR introduce API changes - [ ] Regenerated Golang and Python client if the PR introduces API changes # Notes for Reviewer The version of MLP used here has a validation bug (which is updated on [MLP#117](caraml-dev/mlp#117)). The code could still work with workaround (e.g. set `FinalResponse: true` in one async webhook if user use _all_ async webhook, but it will be confusing for user since async webhook response is expected to not be used anywhere), ~~so preferably to merge this PR after updating the MLP version as dependencies.~~ (MLP version will be updated with the s3 PR) # Release Notes <!-- Does this PR introduce a user-facing change? If no, just write "NONE" in the release-note block below. If yes, a release note is required. Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required". For more information about release notes, see kubernetes' guide here: http://git.k8s.io/community/contributors/guide/release-notes.md --> ```release-note add webhook event call if there's changes on model, model endpoint, model version ```
Background
When trying to initiate all async webhook, the webhook validation check throw an error that "at least 1 sync client must have finalResponse set to true". On the other hands, if trying to setup multiple sync & async client, where only async client has
finalResponse=true
, the validation will passChanges
useIdx > idx
will never be true/reached, because ifuseIdx > idx
then this must have been true then throw an error