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

expose OUTGOING_WEBHOOK_TIMEOUT as env var #3801

Merged

Conversation

KevinDW-Fluxys
Copy link
Contributor

@KevinDW-Fluxys KevinDW-Fluxys commented Jan 31, 2024

What this PR does

It adds functionality to be able to configure the outgoing webhook timeout from an environment variable.

Which issue(s) this PR fixes

Running into timeouts when outgoing webhooks take longer than 4 seconds (which is exceptional, but can happen) the webhook reports failure, while it still might have succeeded on the webhook side.

Checklist

  • Unit, integration, and e2e (if applicable) tests updated
  • Documentation added (or pr:no public docs PR label added if not required)
  • CHANGELOG.md updated (or pr:no changelog PR label added if not required)

@KevinDW-Fluxys KevinDW-Fluxys requested a review from a team January 31, 2024 15:25
@CLAassistant
Copy link

CLAassistant commented Jan 31, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@joeyorlando joeyorlando left a comment

Choose a reason for hiding this comment

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

hi there! thanks for your contribution. The concept makes sense, there's just a few changes needed before we can merge this in.

Also, do you mind augmenting the documentation here to mention that this 4 second timeout is configurable?

Thank you! 🙏

engine/apps/webhooks/utils.py Outdated Show resolved Hide resolved
@KevinDW-Fluxys KevinDW-Fluxys requested a review from a team as a code owner February 1, 2024 08:06
docs/sources/outgoing-webhooks/_index.md Outdated Show resolved Hide resolved
engine/apps/webhooks/tests/test_webhook.py Outdated Show resolved Hide resolved
engine/apps/webhooks/tests/test_webhook.py Outdated Show resolved Hide resolved
engine/apps/webhooks/models/webhook.py Outdated Show resolved Hide resolved
engine/apps/webhooks/models/webhook.py Outdated Show resolved Hide resolved
engine/apps/webhooks/models/webhook.py Outdated Show resolved Hide resolved
engine/apps/webhooks/models/webhook.py Outdated Show resolved Hide resolved
engine/apps/webhooks/models/webhook.py Outdated Show resolved Hide resolved
engine/apps/webhooks/models/webhook.py Outdated Show resolved Hide resolved
engine/apps/alerts/utils.py Outdated Show resolved Hide resolved
@joeyorlando
Copy link
Contributor

@KevinDW-Fluxys do you mind adding this change to the "Added" section in the CHANGELOG.md? Thanks!

KevinDW-Fluxys and others added 11 commits February 1, 2024 14:00
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
Copy link
Contributor

@joeyorlando joeyorlando left a comment

Choose a reason for hiding this comment

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

last two things:

  • address the linting issues
  • revert changes to engine/apps/alerts/utils.py

after that I'll go ahead and approve and merge this 😄

@KevinDW-Fluxys
Copy link
Contributor Author

@joeyorlando Missed a linting change. Thanks for the patient reviewing, I'm not so used to doing this, but its been fun :-)

@joeyorlando joeyorlando merged commit 4e3194c into grafana:dev Feb 1, 2024
17 of 18 checks passed
iskhakov pushed a commit that referenced this pull request Feb 20, 2024
# What this PR does
It adds functionality to be able to configure the outgoing webhook
timeout from an environment variable.

## Which issue(s) this PR fixes
Running into timeouts when outgoing webhooks take longer than 4 seconds
(which is exceptional, but can happen) the webhook reports failure,
while it still might have succeeded on the webhook side.

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
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