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

fix(slo): Use correct calendar period #199873

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

kdelemme
Copy link
Contributor

@kdelemme kdelemme commented Nov 12, 2024

Resolves #199872

🎯 Summary

For a Occurrences and Calendar Aligned based SLO, we used to compute the summary looking at the previous period defined as now-7days (for a weekly calendar aligned) or now-1 month (for a monthly calendar aligned).

This is obviously wrong since we should compute the summary using only the data from the beginning of the current week or current month.

The fix only required to change the lower bound of the range filter to be either now/w or now/M which would translate to the beginning of the week or the month, for a calendar aligned SLO.

Release note

Fix the summary calculation for a calendar aligned and occurrences based SLO

@kdelemme kdelemme added release_note:fix Team:obs-ux-management Observability Management User Experience Team backport:prev-major Backport to (8.x, 8.17, 8.16) the previous major branch and other branches in development bug Fixes for quality problems that affect the customer experience v8.17.0 labels Nov 12, 2024
@kdelemme kdelemme marked this pull request as ready for review November 12, 2024 19:47
@kdelemme kdelemme requested a review from a team as a code owner November 12, 2024 19:47
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Nov 12, 2024
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 docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

Copy link
Contributor

@shahzad31 shahzad31 left a comment

Choose a reason for hiding this comment

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

Code LGTM, changes seems to make sense to me !!

@kdelemme kdelemme merged commit 3cbdcc3 into elastic:main Nov 13, 2024
24 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.15, 8.16, 8.x

https://github.com/elastic/kibana/actions/runs/11823691852

@kdelemme kdelemme deleted the fix/slo-calendar-aligned-summary-calc branch November 13, 2024 18:44
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 13, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 13, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 13, 2024
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.15
8.16
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Nov 13, 2024
# Backport

This will backport the following commits from `main` to `8.16`:
- [fix(slo): Use correct calendar period
(#199873)](#199873)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Kevin
Delemme","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-13T18:39:45Z","message":"fix(slo):
Use correct calendar period
(#199873)","sha":"3cbdcc3609269dcf109fe787359b2504203da229","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","backport:prev-major","ci:project-deploy-observability","Team:obs-ux-management","v8.17.0"],"title":"fix(slo):
Use correct calendar
period","number":199873,"url":"https://github.com/elastic/kibana/pull/199873","mergeCommit":{"message":"fix(slo):
Use correct calendar period
(#199873)","sha":"3cbdcc3609269dcf109fe787359b2504203da229"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199873","number":199873,"mergeCommit":{"message":"fix(slo):
Use correct calendar period
(#199873)","sha":"3cbdcc3609269dcf109fe787359b2504203da229"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Kevin Delemme <[email protected]>
kibanamachine added a commit that referenced this pull request Nov 13, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [fix(slo): Use correct calendar period
(#199873)](#199873)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Kevin
Delemme","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-13T18:39:45Z","message":"fix(slo):
Use correct calendar period
(#199873)","sha":"3cbdcc3609269dcf109fe787359b2504203da229","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","backport:prev-major","ci:project-deploy-observability","Team:obs-ux-management","v8.17.0"],"title":"fix(slo):
Use correct calendar
period","number":199873,"url":"https://github.com/elastic/kibana/pull/199873","mergeCommit":{"message":"fix(slo):
Use correct calendar period
(#199873)","sha":"3cbdcc3609269dcf109fe787359b2504203da229"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199873","number":199873,"mergeCommit":{"message":"fix(slo):
Use correct calendar period
(#199873)","sha":"3cbdcc3609269dcf109fe787359b2504203da229"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Kevin Delemme <[email protected]>
kibanamachine added a commit that referenced this pull request Nov 13, 2024
# Backport

This will backport the following commits from `main` to `8.15`:
- [fix(slo): Use correct calendar period
(#199873)](#199873)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Kevin
Delemme","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-13T18:39:45Z","message":"fix(slo):
Use correct calendar period
(#199873)","sha":"3cbdcc3609269dcf109fe787359b2504203da229","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","v9.0.0","backport:prev-major","ci:project-deploy-observability","Team:obs-ux-management","v8.17.0"],"title":"fix(slo):
Use correct calendar
period","number":199873,"url":"https://github.com/elastic/kibana/pull/199873","mergeCommit":{"message":"fix(slo):
Use correct calendar period
(#199873)","sha":"3cbdcc3609269dcf109fe787359b2504203da229"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199873","number":199873,"mergeCommit":{"message":"fix(slo):
Use correct calendar period
(#199873)","sha":"3cbdcc3609269dcf109fe787359b2504203da229"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Kevin Delemme <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-major Backport to (8.x, 8.17, 8.16) the previous major branch and other branches in development bug Fixes for quality problems that affect the customer experience ci:project-deploy-observability Create an Observability project release_note:fix Team:obs-ux-management Observability Management User Experience Team v8.15.5 v8.16.1 v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SLO] Fix calendar aligned and occurrences SLO summary transform
4 participants