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

[Security Solution][Detection Engine] fixes 410 error on index legacy template call #164682

Merged
merged 32 commits into from
Aug 24, 2023

Conversation

vitaliidm
Copy link
Contributor

@vitaliidm vitaliidm commented Aug 24, 2023

Summary

_template API is blocked on Serverless, causing 410 error when creating list index.

This _template API is used to check existing legacy index templates for lists and items indices

So, in this PR, we won't be throwing error if any of _template APIs called in Serverless environement and return 410 code error(Gone)

vitaliidm and others added 30 commits May 5, 2023 11:42
This reverts commit 245ba57.
@vitaliidm vitaliidm self-assigned this Aug 24, 2023
@vitaliidm vitaliidm added release_note:skip Skip the PR/issue when compiling release notes Team:Detection Engine Security Solution Detection Engine Area v8.11.0 Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. labels Aug 24, 2023
@vitaliidm vitaliidm marked this pull request as ready for review August 24, 2023 10:32
@vitaliidm vitaliidm requested a review from a team as a code owner August 24, 2023 10:32
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@vitaliidm vitaliidm changed the title [Security Solution][Detection Engine] fixes 410 error on legacy template call [Security Solution][Detection Engine] fixes 410 error on index legacy template call Aug 24, 2023
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Security Solution Cypress Tests #9 / Cases Creates a new case with timeline and opens the timeline Creates a new case with timeline and opens the timeline

Metrics [docs]

✅ unchanged

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

cc @vitaliidm

Copy link
Contributor

@e40pud e40pud left a comment

Choose a reason for hiding this comment

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

LGTM! So this is kind of the way to check whether we run on Serverless? Is there any other way to do that?

@vitaliidm
Copy link
Contributor Author

LGTM! So this is kind of the way to check whether we run on Serverless? Is there any other way to do that?

I don't think we do any checks for environment. Code should be environment agnostic in general and work depends on configuration. In that case handling 410 error is kind of similar to 404 - resource/endpoint do not exist, so we continue execution of parent function w/o throwing error. It's a legacy index template, that won't ever exist in Serverless and should be gradually removed from Stateful, if present.

@vitaliidm vitaliidm merged commit 7ee14bc into elastic:main Aug 24, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Aug 24, 2023
jloleysens added a commit that referenced this pull request Aug 24, 2023
* main: (3152 commits)
  [Security Solution][Detection Engine] fixes 410 error on index legacy template call (#164682)
  [SavedObjects] Create serverless roots for jest integration tests (#164157)
  Create upselling package and implement EntityAnalytics serverless upselling (#164136)
  [Fleet] Change 'Out-of-date' to 'Outdated policy' in agent list table (#164673)
  [IndexManagement] Use internal base path for API (#164665)
  [Profiling] removing ~ symbol (#164595)
  [Telemetry] Fetch snapshot: allow specifying the version via querystring (#164670)
  [Cases] Show warning when all cases table reaches 10k cases message (#164323)
  [ML] Removing token list from text expansion model testing (#164560)
  [Fleet] Add secrets package API integration test (#164583)
  [Fleet] Fix security solution tag id (#164582)
  [Security Solution] Modal says "duplicating 0 rules" when you duplicate an individual rule (#163908)
  [api-docs] 2023-08-24 Daily api_docs build (#164658)
  [APM] Cleanup alerting api tests (#164438)
  Upgrade EUI to 87.2.0 (#164385)
  [ML] Fix query bar autocompletion for ML and AIOps embeddables (#164485)
  [Fleet] Fix flaky unit test for the details page (#164641)
  [Security Solution] update codeowner for serverless security subdir (#164640)
  [Security Solution] Fixes Assistant Connector and Actions RBAC Flow (#164382)
  [Discover] Removing large string truncation from doc viewer (#164236)
  ...
@vitaliidm vitaliidm deleted the detection-engine/list-410-fix branch March 4, 2024 17:31
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 release_note:skip Skip the PR/issue when compiling release notes Team:Detection Engine Security Solution Detection Engine Area Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants