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

[8.15] [Search] Fix issue with crawler not getting deleted (#195440) #195483

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.15:

Questions ?

Please refer to the Backport tool documentation

## Summary

The bug is that connector doc can be of `elastic-crawler` service type,
we forgot about this in the logic that handles detaching the index from
connector upon index delation.

This change checks if a connector doc, matching the `index_name` to be
deleted, is of crawler type:
- If yes, delete the connector (crawler) doc, as crawler is always tied
1:1 to an index
- If no, detach the index, leave the connector doc in the connector
index

This bug was likely introduced as a part of:
elastic#183833 (some lazy engineer forgot
to test for this edge case ...)

## Validation

### Delete Crawler case 1: Delete Crawler deletes crawler doc + related
index

https://github.com/user-attachments/assets/68ad14f7-4a7f-408c-8731-6ed0465f9ef1

### Delete Crawler case 2: Delete crawler-related index deletes crawler
doc

https://github.com/user-attachments/assets/e2995697-32c4-4f8f-90ce-9c06c7e6d208
(cherry picked from commit bf62169)
@kibanamachine kibanamachine merged commit 42ba6b3 into elastic:8.15 Oct 8, 2024
23 of 24 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

cc @jedrazb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants