Skip to content

[Obs AI Assistant] Remove index write blocks#220362

Merged
sorenlouv merged 3 commits intoelastic:mainfrom
sorenlouv:remove-index-write-blocks
May 8, 2025
Merged

[Obs AI Assistant] Remove index write blocks#220362
sorenlouv merged 3 commits intoelastic:mainfrom
sorenlouv:remove-index-write-blocks

Conversation

@sorenlouv
Copy link
Member

@sorenlouv sorenlouv commented May 7, 2025

Closes #220248

  • This PR removes the write index blocks that were previously added when starting a reindex operation. The index blocks were added to prevent writes to the source index, while it was being re-indexed to a target index.
  • Re-enables tests to run on MKI

Why index blocks should be removed:

  • Immediately after creating the target index, the KB write index alias is pointed over to the new target index. This means that it is possible to ingest documents to the new target index, while the re-index is in progress. Thus, we no longer need to block writes
  • Index blocks must be cleaned up. If a node crashes after a re-index operation has been started, the reindex operation itself will continue to run because it is handled by Elasticsearch with all the guarantees it provides. However, the index block will not be removed again, causing a permanent dead lock until customers remove the index block themselves. Customers should not end up in this situation.
  • Index blocks are causing tests to fail, when the index block is not properly cleaned up afterwards: [FLAKY ON MKI] 6 tests in 2 test files failing, under the same config #220248

@sorenlouv sorenlouv added backport:version Backport to applied version labels v9.1.0 v8.19.0 labels May 7, 2025
@sorenlouv sorenlouv marked this pull request as ready for review May 7, 2025 11:50
@sorenlouv sorenlouv requested a review from a team as a code owner May 7, 2025 11:50
@viduni94 viduni94 added the Team:Obs AI Assistant Observability AI Assistant label May 7, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant)

@viduni94 viduni94 added the ci:project-deploy-observability Create an Observability project label May 7, 2025
@github-actions
Copy link
Contributor

github-actions bot commented May 7, 2025

🤖 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!)

@viduni94
Copy link
Contributor

viduni94 commented May 7, 2025

Added label to deploy serverless project and rebasing to do a MKI run

…lity/ai_assistant/knowledge_base/knowledge_base_warmup_model.spec.ts

Co-authored-by: Viduni Wickramarachchi <viduni.ushanka@gmail.com>
@sorenlouv sorenlouv enabled auto-merge (squash) May 8, 2025 07:06
@elasticmachine
Copy link
Contributor

elasticmachine commented May 8, 2025

💚 Build Succeeded

  • Buildkite Build
  • Commit: 672c789
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-220362-672c7892c7da

Metrics [docs]

✅ unchanged

History

@sorenlouv sorenlouv merged commit 3c95148 into elastic:main May 8, 2025
10 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

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

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.19:
- [Obs AI Assistant] Add support for dense vector embeddings in API tests (#219199)

Manual backport

To create the backport manually run:

node scripts/backport --pr 220362

Questions ?

Please refer to the Backport tool documentation

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🟠 Some tests failed. - kibana-flaky-test-suite-runner#8250

[❌] x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts: 99/100 tests passed.
[❌] x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.ai_assistant.serverless.config.ts: 73/100 tests passed.

see run history

@sorenlouv
Copy link
Member Author

💚 All backports created successfully

Status Branch Result
8.19

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

Questions ?

Please refer to the Backport tool documentation

sorenlouv added a commit to sorenlouv/kibana that referenced this pull request May 8, 2025
Closes elastic#220248

- This PR removes the write index blocks that were previously added when
starting a reindex operation. The index blocks were added to prevent
writes to the source index, while it was being re-indexed to a target
index.
- Re-enables tests to run on MKI

Why index blocks should be removed:

- Immediately after creating the target index, the KB write index alias
is pointed over to the new target index. This means that it is possible
to ingest documents to the new target index, while the re-index is in
progress. Thus, we no longer need to block writes
- Index blocks must be cleaned up. If a node crashes after a re-index
operation has been started, the reindex operation itself will continue
to run because it is handled by Elasticsearch with all the guarantees it
provides. However, the index block will not be removed again, causing a
permanent dead lock until customers remove the index block themselves.
Customers should not end up in this situation.
- Index blocks are causing tests to fail, when the index block is not
properly cleaned up afterwards:
elastic#220248

---------

Co-authored-by: Viduni Wickramarachchi <viduni.wickramarachchi@elastic.co>
Co-authored-by: Viduni Wickramarachchi <viduni.ushanka@gmail.com>
(cherry picked from commit 3c95148)

# Conflicts:
#	x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_basic_operations.spec.ts
#	x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_change_model_from_elser_to_e5.spec.ts
#	x-pack/test/api_integration/deployment_agnostic/apis/observability/ai_assistant/knowledge_base/knowledge_base_status.spec.ts
sorenlouv added a commit that referenced this pull request May 8, 2025
# Backport

This will backport the following commits from `main` to `8.19`:
- [[Obs AI Assistant] Remove index write blocks
(#220362)](#220362)

<!--- Backport version: 9.6.6 -->

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

<!--BACKPORT [{"author":{"name":"Søren
Louv-Jansen","email":"soren.louv@elastic.co"},"sourceCommit":{"committedDate":"2025-05-08T08:42:54Z","message":"[Obs
AI Assistant] Remove index write blocks (#220362)\n\nCloses
https://github.com/elastic/kibana/issues/220248\n\n- This PR removes the
write index blocks that were previously added when\nstarting a reindex
operation. The index blocks were added to prevent\nwrites to the source
index, while it was being re-indexed to a target\nindex.\n- Re-enables
tests to run on MKI\n\nWhy index blocks should be removed:\n\n-
Immediately after creating the target index, the KB write index
alias\nis pointed over to the new target index. This means that it is
possible\nto ingest documents to the new target index, while the
re-index is in\nprogress. Thus, we no longer need to block writes\n-
Index blocks must be cleaned up. If a node crashes after a
re-index\noperation has been started, the reindex operation itself will
continue\nto run because it is handled by Elasticsearch with all the
guarantees it\nprovides. However, the index block will not be removed
again, causing a\npermanent dead lock until customers remove the index
block themselves.\nCustomers should not end up in this situation.\n-
Index blocks are causing tests to fail, when the index block is
not\nproperly cleaned up
afterwards:\nhttps://github.com//issues/220248\n\n---------\n\nCo-authored-by:
Viduni Wickramarachchi
<viduni.wickramarachchi@elastic.co>\nCo-authored-by: Viduni
Wickramarachchi
<viduni.ushanka@gmail.com>","sha":"3c9514816d0d796af0429c388578d9593f1f7aee","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Obs
AI
Assistant","ci:project-deploy-observability","backport:version","v9.1.0","v8.19.0"],"title":"[Obs
AI Assistant] Remove index write
blocks","number":220362,"url":"https://github.com/elastic/kibana/pull/220362","mergeCommit":{"message":"[Obs
AI Assistant] Remove index write blocks (#220362)\n\nCloses
https://github.com/elastic/kibana/issues/220248\n\n- This PR removes the
write index blocks that were previously added when\nstarting a reindex
operation. The index blocks were added to prevent\nwrites to the source
index, while it was being re-indexed to a target\nindex.\n- Re-enables
tests to run on MKI\n\nWhy index blocks should be removed:\n\n-
Immediately after creating the target index, the KB write index
alias\nis pointed over to the new target index. This means that it is
possible\nto ingest documents to the new target index, while the
re-index is in\nprogress. Thus, we no longer need to block writes\n-
Index blocks must be cleaned up. If a node crashes after a
re-index\noperation has been started, the reindex operation itself will
continue\nto run because it is handled by Elasticsearch with all the
guarantees it\nprovides. However, the index block will not be removed
again, causing a\npermanent dead lock until customers remove the index
block themselves.\nCustomers should not end up in this situation.\n-
Index blocks are causing tests to fail, when the index block is
not\nproperly cleaned up
afterwards:\nhttps://github.com//issues/220248\n\n---------\n\nCo-authored-by:
Viduni Wickramarachchi
<viduni.wickramarachchi@elastic.co>\nCo-authored-by: Viduni
Wickramarachchi
<viduni.ushanka@gmail.com>","sha":"3c9514816d0d796af0429c388578d9593f1f7aee"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/220362","number":220362,"mergeCommit":{"message":"[Obs
AI Assistant] Remove index write blocks (#220362)\n\nCloses
https://github.com/elastic/kibana/issues/220248\n\n- This PR removes the
write index blocks that were previously added when\nstarting a reindex
operation. The index blocks were added to prevent\nwrites to the source
index, while it was being re-indexed to a target\nindex.\n- Re-enables
tests to run on MKI\n\nWhy index blocks should be removed:\n\n-
Immediately after creating the target index, the KB write index
alias\nis pointed over to the new target index. This means that it is
possible\nto ingest documents to the new target index, while the
re-index is in\nprogress. Thus, we no longer need to block writes\n-
Index blocks must be cleaned up. If a node crashes after a
re-index\noperation has been started, the reindex operation itself will
continue\nto run because it is handled by Elasticsearch with all the
guarantees it\nprovides. However, the index block will not be removed
again, causing a\npermanent dead lock until customers remove the index
block themselves.\nCustomers should not end up in this situation.\n-
Index blocks are causing tests to fail, when the index block is
not\nproperly cleaned up
afterwards:\nhttps://github.com//issues/220248\n\n---------\n\nCo-authored-by:
Viduni Wickramarachchi
<viduni.wickramarachchi@elastic.co>\nCo-authored-by: Viduni
Wickramarachchi
<viduni.ushanka@gmail.com>","sha":"3c9514816d0d796af0429c388578d9593f1f7aee"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request May 29, 2025
Closes elastic#220248

- This PR removes the write index blocks that were previously added when
starting a reindex operation. The index blocks were added to prevent
writes to the source index, while it was being re-indexed to a target
index.
- Re-enables tests to run on MKI

Why index blocks should be removed:

- Immediately after creating the target index, the KB write index alias
is pointed over to the new target index. This means that it is possible
to ingest documents to the new target index, while the re-index is in
progress. Thus, we no longer need to block writes
- Index blocks must be cleaned up. If a node crashes after a re-index
operation has been started, the reindex operation itself will continue
to run because it is handled by Elasticsearch with all the guarantees it
provides. However, the index block will not be removed again, causing a
permanent dead lock until customers remove the index block themselves.
Customers should not end up in this situation.
- Index blocks are causing tests to fail, when the index block is not
properly cleaned up afterwards:
elastic#220248

---------

Co-authored-by: Viduni Wickramarachchi <viduni.wickramarachchi@elastic.co>
Co-authored-by: Viduni Wickramarachchi <viduni.ushanka@gmail.com>
qn895 pushed a commit to qn895/kibana that referenced this pull request Jun 3, 2025
Closes elastic#220248

- This PR removes the write index blocks that were previously added when
starting a reindex operation. The index blocks were added to prevent
writes to the source index, while it was being re-indexed to a target
index.
- Re-enables tests to run on MKI

Why index blocks should be removed:

- Immediately after creating the target index, the KB write index alias
is pointed over to the new target index. This means that it is possible
to ingest documents to the new target index, while the re-index is in
progress. Thus, we no longer need to block writes
- Index blocks must be cleaned up. If a node crashes after a re-index
operation has been started, the reindex operation itself will continue
to run because it is handled by Elasticsearch with all the guarantees it
provides. However, the index block will not be removed again, causing a
permanent dead lock until customers remove the index block themselves.
Customers should not end up in this situation.
- Index blocks are causing tests to fail, when the index block is not
properly cleaned up afterwards:
elastic#220248

---------

Co-authored-by: Viduni Wickramarachchi <viduni.wickramarachchi@elastic.co>
Co-authored-by: Viduni Wickramarachchi <viduni.ushanka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels ci:project-deploy-observability Create an Observability project release_note:fix Team:Obs AI Assistant Observability AI Assistant v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FLAKY ON MKI] 6 tests in 2 test files failing, under the same config

4 participants