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

Improve time window handling and validation #161978

Conversation

kdelemme
Copy link
Contributor

@kdelemme kdelemme commented Jul 14, 2023

Summary

This PR enforces the following time window for SLOs:

  • rolling: 7, 30 or 90 days
  • calendar aligned: 1 week or 1 month

We enforce these durations so we can use a finite number of summary transforms.

I've also fixed an issue with calendar aligned time window when calculating the date range for a weekly one: relying on startOf('isoWeek') which is Monday, as for Elasticsearch.
I've cleaned up a bunch of unnecessary tests related to no more valid time window duration as well.

@kdelemme kdelemme self-assigned this Jul 14, 2023
@kdelemme kdelemme added release_note:skip Skip the PR/issue when compiling release notes Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" v8.10.0 labels Jul 14, 2023
@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@kdelemme kdelemme force-pushed the slo/feature-branch_time-window-refactoring branch from e05f730 to b7d0fdd Compare July 14, 2023 15:20
@kdelemme kdelemme force-pushed the slo/feature-branch_time-window-refactoring branch from b7d0fdd to cfb087b Compare July 14, 2023 15:23
@kdelemme kdelemme marked this pull request as ready for review July 14, 2023 15:23
@kdelemme kdelemme requested a review from a team as a code owner July 14, 2023 15:23
@elasticmachine
Copy link
Contributor

Pinging @elastic/actionable-observability (Team: Actionable Observability)

case 'w':
return 'weeks';
return 'isoWeek';
Copy link
Member

Choose a reason for hiding this comment

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

👍

@kibana-ci
Copy link
Collaborator

💔 Build Failed

Failed CI Steps

Metrics [docs]

‼️ ERROR: no builds found for mergeBase sha [887432c]

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @kdelemme

@kdelemme kdelemme merged this pull request into elastic:slo/feature-branch Jul 14, 2023
@kdelemme kdelemme deleted the slo/feature-branch_time-window-refactoring branch July 14, 2023 19:40
Copy link
Member

@simianhacker simianhacker left a comment

Choose a reason for hiding this comment

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

LGTM

kdelemme added a commit to kdelemme/kibana that referenced this pull request Jul 17, 2023
kdelemme added a commit to kdelemme/kibana that referenced this pull request Jul 18, 2023
kdelemme added a commit to kdelemme/kibana that referenced this pull request Jul 24, 2023
kdelemme added a commit to kdelemme/kibana that referenced this pull request Jul 27, 2023
kdelemme added a commit to kdelemme/kibana that referenced this pull request Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" v8.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants