-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
[bug]: Mutation WebHook throws JsonDiff ArgumentOutOfRangeException exception #682
Labels
bug
Something isn't working
Comments
PR created with fix: #683 |
buehler
added a commit
that referenced
this issue
Dec 27, 2023
Concurrent execution of JsonDiffer() on multiple threads causes ArgumentOutOfRangeException during Dispose(). Create new instance of JsonPatchDeltaFormatter for every call. Please refer to this issue: #682 --------- Co-authored-by: AVEVA\rajani.rao <[email protected]> Co-authored-by: Christoph Bühler <[email protected]>
Hey @rajaniraog I can try :) |
buehler
added a commit
that referenced
this issue
Jan 17, 2024
Concurrent execution of JsonDiffer() on multiple threads causes ArgumentOutOfRangeException during Dispose(). Create new instance of JsonPatchDeltaFormatter for every call. Please refer to this issue: #682 --------- Co-authored-by: AVEVA\rajani.rao <[email protected]> Co-authored-by: Christoph Bühler <[email protected]>
buehler
added a commit
that referenced
this issue
Jan 17, 2024
Concurrent execution of JsonDiffer() on multiple threads causes ArgumentOutOfRangeException during Dispose(). Create new instance of JsonPatchDeltaFormatter for every call. Please refer to this issue: #682 --------- Co-authored-by: AVEVA\rajani.rao <[email protected]> Co-authored-by: Christoph Bühler <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When mutiple Mutation WebHooks are created simultaneously with changes, resulting in modified
MutationResult()
, theAdmissionResponse IAdmissionWebhook<TEntity, MutationResult>.TransformResult(MutationResult result, AdmissionRequest<TEntity> request)
invokesKubernetesJsonDiffer.DiffObjects(from, to);
gets invoked which then callsKubernetesJsonDiffer.DiffObjects(from, to);
which isn't thread safe due to using a `static JsonPatchDeltaFormatter Formatter = new();``To reproduce
Make simultaneous calls to Mutation WebHooks
MutationResult IAdmissionWebhook<TEntity, MutationResult>.Create(TEntity newEntity, bool dryRun)
results inSystem.ArgumentOutOfRangeException
. See additional context below for full callstack.Expected behavior
No exception should occur when making simultaneous calls to Mutation WebHooks with a modified
MutationResult()
Screenshots
No response
Additional Context
The text was updated successfully, but these errors were encountered: