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

support corner cases in SLO convertor function #1986

Closed
Tracked by #1646
odubajDT opened this issue Aug 30, 2023 · 0 comments · Fixed by #1999
Closed
Tracked by #1646

support corner cases in SLO convertor function #1986

odubajDT opened this issue Aug 30, 2023 · 0 comments · Fixed by #1999
Assignees

Comments

@odubajDT
Copy link
Contributor

odubajDT commented Aug 30, 2023

Follow-up of #1760

Depends on #1976

Goal

The goal of this issue is to handle more complex corner cases in the SLO evaluation logic, that means interval ranges for the metric values. Definitions with a single criteria element with a single rule are already covered with #1955

Details

There are multiple options to be converted. There is a need to convert the use-cases that make logical sense and are common, but in some cases, where it is problematic and these cases will not be supported.

Criteria with 3 and more inputs won't be supported, only the first 2 non-percentage inputs (those not containing % as we do not support comparison rules) will be taken and converted. In the example below, only <600 and >400 rules will be converted. Rule >800 will be ignored.

objectives:
- sli: response_time_p95
  displayName: "Response Time P95"
  pass:
  - criteria
    - "<600"
    - ">400"
    - ">800"
  weight: 2
  key_sli: true

Secondly, support of conversion of multiple criteria elements won't be supported at all -> these criteria are combined with logical OR operator (see documentation here). Only a single criteria element rules will be supported. An example of unsupported SLOs for conversion here:

objectives:
- sli: response_time_p95
  displayName: "Response Time P95"
  pass:
  - criteria:
    - "<=+10%"
  - criteria
    - "<600"
  weight: 2
  key_sli: true

The buckets for rules with single criteria element but with one or more criteria combined with AND operator (see documentation here):

  1. pass criteria set, warn criteria not set -> supported
objectives:
- sli: response_time_p95
  displayName: "Response Time P95"
  pass:
  - criteria:
    - ">400"
    - "<600"
  1. pass criteria set, warn criteria set, warn criteria interval is superset of pass criteria interval -> supported
objectives:
- sli: response_time_p95
 displayName: "Response Time P95"
 pass:
 - criteria:
   - ">400"
   - "<600"
 warn:
 - criteria:
   - ">200"
   - "<800" 
  1. pass criteria set, warn criteria set, pass criteria interval is superset of warn criteria interval -> supported
objectives:
- sli: response_time_p95
 displayName: "Response Time P95"
 pass:
 - criteria:
   - ">200"
   - "<800"
 warn:
 - criteria:
   - ">400"
   - "<600" 
  1. pass criteria set, warn criteria set, pass criteria interval and warn criteria interval do not intercept -> unsupported
objectives:
- sli: response_time_p95
 displayName: "Response Time P95"
 pass:
 - criteria:
   - ">200"
   - "<400"
 warn:
 - criteria:
   - ">600"
   - "<800" 

DoD

  • all the supported buckets options are able to be converted to AnalysisDefinition criteria logic
  • unit tests
  • usage of converter is documented together with corner-cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant