configuration-anomaly-detection icon indicating copy to clipboard operation
configuration-anomaly-detection copied to clipboard

[PoC] Custom interceptor

Open typeid opened this issue 1 year ago • 3 comments

This is a PoC as part of RDA7: this PR adds a custom interceptor that allows routing all alerts to CAD without starting a new pipeline for each alert. To achieve this, we create a custom interceptor in the form of a small http service that will determine whether or not we handle the alert or escalate it.

TODOs:

  • the interceptor must contain the logic for incident -> alert mapping
  • deployment of the interceptor needs to be part of CAD deployment

typeid avatar May 21 '24 07:05 typeid

/hold POC

typeid avatar May 21 '24 07:05 typeid

/unhold We can merge this as it won't be used until we add a deployment.

typeid avatar May 27 '24 12:05 typeid

Codecov Report

Attention: Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.

Project coverage is 37.82%. Comparing base (24e690d) to head (3327074). Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #280      +/-   ##
==========================================
- Coverage   38.07%   37.82%   -0.25%     
==========================================
  Files          19       19              
  Lines        1547     1557      +10     
==========================================
  Hits          589      589              
- Misses        919      929      +10     
  Partials       39       39              
Files Coverage Δ
pkg/metrics/metrics.go 16.66% <0.00%> (ø)
pkg/pagerduty/pagerduty.go 69.96% <0.00%> (-2.57%) :arrow_down:

codecov-commenter avatar May 27 '24 13:05 codecov-commenter

/unhold

typeid avatar May 27 '24 13:05 typeid

/retest

typeid avatar May 27 '24 15:05 typeid

/retest

typeid avatar May 27 '24 16:05 typeid

/retest

typeid avatar May 28 '24 06:05 typeid

@typeid: This pull request references OSD-23695 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.17.0" version, but no target version was set.

In response to this:

This is a PoC as part of RDA7: this PR adds a custom interceptor that allows routing all alerts to CAD without starting a new pipeline for each alert. To achieve this, we create a custom interceptor in the form of a small http service that will determine whether or not we handle the alert or escalate it.

TODOs:

  • the interceptor must contain the logic for incident -> alert mapping
  • deployment of the interceptor needs to be part of CAD deployment

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

openshift-ci-robot avatar May 28 '24 08:05 openshift-ci-robot

@typeid: This pull request references OSD-23695 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.17.0" version, but no target version was set.

In response to this:

This PR adds a custom interceptor that allows routing all alerts to CAD without starting a new pipeline for each alert. To achieve this, we create a custom interceptor in the form of a small http service that will determine whether or not we handle the alert or escalate it.

This PR does not yet add a deployment, therefore the binary is unused. The deployment will be added in a follow up PR.

https://issues.redhat.com/browse/OSD-23695

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

openshift-ci-robot avatar May 28 '24 08:05 openshift-ci-robot

I added a couple of comments on minor things, apart from that it looks good.

zmird-r avatar Jun 03 '24 08:06 zmird-r

/label tide/merge-method-squash

typeid avatar Jun 24 '24 11:06 typeid

/lgtm

zmird-r avatar Jun 24 '24 11:06 zmird-r

/lgtm

zmird-r avatar Jun 24 '24 11:06 zmird-r

/honk

typeid avatar Jun 25 '24 06:06 typeid

@typeid: goose image

In response to this:

/honk

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

openshift-ci[bot] avatar Jun 25 '24 06:06 openshift-ci[bot]

/lgtm

zmird-r avatar Jun 25 '24 08:06 zmird-r

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: typeid, zmird-r

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

openshift-ci[bot] avatar Jun 25 '24 08:06 openshift-ci[bot]

/oink

typeid avatar Jun 25 '24 08:06 typeid

/meow

typeid avatar Jun 25 '24 08:06 typeid

@typeid: cat image

In response to this:

/meow

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

openshift-ci[bot] avatar Jun 25 '24 08:06 openshift-ci[bot]

/retest

Ran into a timeout, maybe I need to increase the timeout since we're now linting more things.

typeid avatar Jun 25 '24 09:06 typeid

@typeid: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

openshift-ci[bot] avatar Jun 25 '24 09:06 openshift-ci[bot]