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

[8.7] Fix Watcher email actions not using WebhookService for HTTP requests (#95196) #95256

Merged
merged 1 commit into from
Apr 14, 2023

Conversation

dakrone
Copy link
Member

@dakrone dakrone commented Apr 14, 2023

Backports the following commits to 8.7:

…lastic#95196)

This commit fixes a bug where the internal `WebhookService` was not being used for Watcher's `email` attachment `reporting` or `url` types. This meant that why the additional token configured as part of elastic#93426 was sent for `webhook` Watcher actions, it was not being sent in the HTTP request made when resolving the attachments of the `email` action.

To accomplish this, the parts of `WebhookService` that modify and make the request have been extracted, and the `WebhookService` is now used by the `ReportingAttachmentParser` and `HttpEmailAttachmentParser` to perform their HTTP requests.

Additionally, some debug logging has been added for when the token is sent (and when a `WebhookService` request is executed).
@dakrone dakrone added :Data Management/Watcher >bug auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport cloud-deploy Publish cloud docker image for Cloud-First-Testing Team:Data Management Meta label for data/management team labels Apr 14, 2023
@elasticsearchmachine elasticsearchmachine merged commit 9228107 into elastic:8.7 Apr 14, 2023
@dakrone dakrone deleted the backport/8.7/pr-95196 branch April 14, 2023 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug cloud-deploy Publish cloud docker image for Cloud-First-Testing :Data Management/Watcher Team:Data Management Meta label for data/management team v8.7.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants