Skip to content

Issues when generating SLOs with custom period window #457

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

Closed
Haegi opened this issue Dec 22, 2022 · 2 comments
Closed

Issues when generating SLOs with custom period window #457

Haegi opened this issue Dec 22, 2022 · 2 comments
Labels

Comments

@Haegi
Copy link

Haegi commented Dec 22, 2022

Issue

When specifying a custom slo period window, the sloth cli returns some technical errors and not the expected behaviour.
Even when following the guide on the website, it doesn't work properly.
Especially without altering enabled, the page & ticket windows are still required in the AlertWindows.

Expected behaviour

It should be easy to generate SLOs with custom period windows (e.g. 7d or 14d)

Steps to reproduce

Scenario 1: Just specifying the default-slo-period

sloth generate --default-slo-period="14d" -i ./examples/getting-started.yml
...
error: "generate" command failed: invalid default slo period: window period 336h0m0s missing%

Very technical error

Scenario 2: Specifying the default-slo-period and slo-period-windows-path

sloth generate --default-slo-period="7d" --slo-period-windows-path=./examples/windows -i ./examples/getting-started.yml

Works

Scenario 3: Specifying the default-slo-period and slo-period-windows-path without alerting/paging

Change 7d.yaml to not include alerting/paging

apiVersion: sloth.slok.dev/v1
kind: AlertWindows
spec:
  sloPeriod: 7d
sloth generate --default-slo-period="7d" --slo-period-windows-path=./examples/windows -i ./examples/no-alerts.yml
(error: "generate" command failed: could not load SLO period windows repository: could not initialize custom windows: could not discover period windows: could not load "7d.yaml" alert windows: invalid alerting window: invalid page quick: long window is required%

It seems like the page & ticket section in the AlertWindows is needed even though it is not used in the SLO spec.

Ideas

Improve error messages

  • Throw a proper error message when custom window can't be found
  • Throw a proper error message when the page/ticket section in the AlertWindows is missing (make it required)

Don't throw an error if altering is not needed

  • When the alerting is disabled in the SLO spec, it should not be required in the AlertWindows section
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.

@github-actions github-actions bot added the stale label Mar 30, 2025
Copy link

This issue was closed because it has been stale for 15 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant