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 bug in overdue task metric script #192863

Merged

Conversation

mikecote
Copy link
Contributor

@mikecote mikecote commented Sep 13, 2024

Fixing a bug from #192603 where tasks in idle wouldn't show up in overdue metrics.

To verify

  1. Set xpack.task_manager.unsafe.exclude_task_types: ['actions:*'] in your kibana.yml
  2. Startup Elasticsearch and Kibana
  3. Create an always firing rule that logs a server log message
  4. Observe the metrics endpoint /api/task_manager/metrics and that the overdue metrics overall, for actions and for server log increase over time because the task is skipped

@mikecote mikecote added release_note:skip Skip the PR/issue when compiling release notes Feature:Task Manager Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v9.0.0 backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) v8.16.0 labels Sep 13, 2024
@mikecote mikecote self-assigned this Sep 13, 2024
@mikecote mikecote marked this pull request as ready for review September 13, 2024 13:03
@mikecote mikecote requested a review from a team as a code owner September 13, 2024 13:03
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

Copy link
Contributor

@ymao1 ymao1 left a comment

Choose a reason for hiding this comment

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

LGTM. Verified works as expected.

@kibana-ci
Copy link
Collaborator

kibana-ci commented Sep 13, 2024

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #13 / AssigneesColumn displays the show less avatars button when the show more is clicked
  • [job] [logs] Jest Tests #13 / EditableMarkdown Save button click calls onSaveContent and onChangeEditable when text area value changed

Metrics [docs]

✅ unchanged

History

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

cc @mikecote

@mikecote mikecote merged commit 1854acd into elastic:main Sep 13, 2024
44 of 45 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 13, 2024
Fixing a bug from elastic#192603 where
tasks in idle wouldn't show up in overdue metrics.

## To verify
1. Set `xpack.task_manager.unsafe.exclude_task_types: ['actions:*']` in
your kibana.yml
2. Startup Elasticsearch and Kibana
3. Create an always firing rule that logs a server log message
4. Observe the metrics endpoint `/api/task_manager/metrics` and that the
overdue metrics overall, for actions and for server log increase over
time because the task is skipped

(cherry picked from commit 1854acd)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.16 The branch "8.16" does not exist
8.x

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 192863

Questions ?

Please refer to the Backport tool documentation

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

This will backport the following commits from `main` to `8.x`:
- [Fix bug in overdue task metric script
(#192863)](#192863)

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

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

<!--BACKPORT [{"author":{"name":"Mike
Côté","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-13T15:51:47Z","message":"Fix
bug in overdue task metric script (#192863)\n\nFixing a bug from
#192603 where\r\ntasks in idle
wouldn't show up in overdue metrics.\r\n\r\n## To verify\r\n1. Set
`xpack.task_manager.unsafe.exclude_task_types: ['actions:*']` in\r\nyour
kibana.yml\r\n2. Startup Elasticsearch and Kibana\r\n3. Create an always
firing rule that logs a server log message\r\n4. Observe the metrics
endpoint `/api/task_manager/metrics` and that the\r\noverdue metrics
overall, for actions and for server log increase over\r\ntime because
the task is
skipped","sha":"1854acd557531501ed600204ac766c5670c29f38","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Feature:Task
Manager","Team:ResponseOps","v9.0.0","backport:prev-minor","v8.16.0"],"title":"Fix
bug in overdue task metric
script","number":192863,"url":"https://github.com/elastic/kibana/pull/192863","mergeCommit":{"message":"Fix
bug in overdue task metric script (#192863)\n\nFixing a bug from
#192603 where\r\ntasks in idle
wouldn't show up in overdue metrics.\r\n\r\n## To verify\r\n1. Set
`xpack.task_manager.unsafe.exclude_task_types: ['actions:*']` in\r\nyour
kibana.yml\r\n2. Startup Elasticsearch and Kibana\r\n3. Create an always
firing rule that logs a server log message\r\n4. Observe the metrics
endpoint `/api/task_manager/metrics` and that the\r\noverdue metrics
overall, for actions and for server log increase over\r\ntime because
the task is
skipped","sha":"1854acd557531501ed600204ac766c5670c29f38"}},"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/192863","number":192863,"mergeCommit":{"message":"Fix
bug in overdue task metric script (#192863)\n\nFixing a bug from
#192603 where\r\ntasks in idle
wouldn't show up in overdue metrics.\r\n\r\n## To verify\r\n1. Set
`xpack.task_manager.unsafe.exclude_task_types: ['actions:*']` in\r\nyour
kibana.yml\r\n2. Startup Elasticsearch and Kibana\r\n3. Create an always
firing rule that logs a server log message\r\n4. Observe the metrics
endpoint `/api/task_manager/metrics` and that the\r\noverdue metrics
overall, for actions and for server log increase over\r\ntime because
the task is
skipped","sha":"1854acd557531501ed600204ac766c5670c29f38"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Mike Côté <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Feature:Task Manager release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants