refactor(webhook): use gateway request context for transformer adapter timeout by akshit-git24 · Pull Request #6788 · rudderlabs/rudder-server
Description
This PR refactors the existing context in the batchTransformLoop in the webhook.go . Currently there is a TODO : Remove timeout from here after timeout handler is added in gateway. The worker was creating an isolated, hardcoded 10-second timer instead of properly inheriting the master HTTP timeout rules from the original incoming webhook request. . After the changes made in #6751, we can now safely use the original incoming webhook request as same as of gateway.
changes
- Removed
context.WithTimeoutand the associatedcancel()function calls inbatchTransformLoop. - Replaced the manual context with
req.request.Context(). - Deleted the resolved
TODOcomment.
Security
- The code changed/added as part of this pull request won't create any security issues with how the software is being used.