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

Cleanup unused code for claiming tasks by id #144408

Merged
merged 3 commits into from
Nov 9, 2022

Conversation

mikecote
Copy link
Contributor

@mikecote mikecote commented Nov 2, 2022

In this PR, I'm cleaning up code within Task Manager regarding claiming tasks by id that is no longer used. The code was previously used for running alerting rules right away but recently runNow got replaced with runSoon which no longer needs this code to function. For more info on the previous change, see #133550.

@mikecote mikecote added Feature:Task Manager Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Nov 2, 2022
@mikecote mikecote self-assigned this Nov 2, 2022
)
),
]);
this.emitEvents(docs.map((doc) => asTaskClaimEvent(doc.id, asOk(doc))));
Copy link
Contributor Author

@mikecote mikecote Nov 8, 2022

Choose a reason for hiding this comment

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

Because all claim events are asOk, there is no more code paths that emitEvents of asErr for claiming. So I removed the code around TaskClaimErrorType and error handling as well.

@mikecote mikecote added release_note:skip Skip the PR/issue when compiling release notes v8.6.0 labels Nov 8, 2022
@mikecote mikecote marked this pull request as ready for review November 8, 2022 12:46
@mikecote mikecote requested a review from a team as a code owner November 8, 2022 12:46
@elasticmachine
Copy link
Contributor

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

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #33 / Resolver test app when the user is interacting with the node with ID: secondChild when the user hovers over the primary button when the user has clicked the primary button (which selects the node.) should render as expected

Metrics [docs]

Unknown metric groups

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 59 65 +6
osquery 108 113 +5
securitySolution 440 446 +6
total +19

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 67 73 +6
osquery 109 115 +6
securitySolution 517 523 +6
total +20

History

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

cc @mikecote

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!

@mikecote mikecote merged commit daf9322 into elastic:main Nov 9, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Nov 9, 2022
jloleysens added a commit to jloleysens/kibana that referenced this pull request Nov 9, 2022
* main:
  [Lens] Rearrange options (elastic#144891)
  [Actionable Observability] Integrate alert search bar on rule details page (elastic#144718)
  [Security Solution] [Exceptions] Adds options to create a shared exception list and to create a single item from the manage exceptions view (elastic#144575)
  [Actionable Observability] Add context.alertDetailsUrl to connector template for Uptime > Monitor status & Uptime TLS rules (elastic#144740)
  [Security Solution] [Feat] Add Bulk Events to Timeline. (elastic#142737)
  [TIP] Env specific cypress config (elastic#144894)
  skip flaky suite (elastic#144885)
  [Enterprise Search] Fixes Search Index page to go blank when connection lost (elastic#144022)
  [Cloud Posture] track findings pages (elastic#144822)
  [ContentManagement] Inspector flyout (elastic#144240)
  [Cloud Posture] Dashboard Redesign - data counter cards (elastic#144565)
  [TIP] Run e2e pipeline on CI (elastic#144776)
  [Guided onboarding] Config updates for the Security guide (elastic#144844)
  Cleanup unused code for claiming tasks by id (elastic#144408)
  Ping the response-ops team whenever a new connector type is registered (elastic#144736)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting 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.6.0
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

5 participants