-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Remove test usages of DataStream#getDefaultBackingIndexName
#123376
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
Labels
:Data Management/Data streams
Data streams and their lifecycles
Team:Data Management
Meta label for data/management team
>test
Issues or PRs that are addressing/adding tests
Comments
Pinging @elastic/es-data-management (Team:Data Management) |
nielsbauman
added a commit
to nielsbauman/elasticsearch
that referenced
this issue
Feb 25, 2025
When these tests were run around midnight, the use of `DataStream#getDefaultBackingIndexName` could result in a potential mismatch in the generated index name and the one that the cluster actually created. Instead, we need to obtain the backing index and extract the desired index name from there. Fixes elastic#123086 Relates elastic#123376
nielsbauman
added a commit
that referenced
this issue
Feb 26, 2025
When these tests were run around midnight, the use of `DataStream#getDefaultBackingIndexName` could result in a potential mismatch in the generated index name and the one that the cluster actually created. Instead, we need to obtain the backing index and extract the desired index name from there. Fixes #123086 Relates #123376
nielsbauman
added a commit
to nielsbauman/elasticsearch
that referenced
this issue
Feb 26, 2025
When these tests were run around midnight, the use of `DataStream#getDefaultBackingIndexName` could result in a potential mismatch in the generated index name and the one that the cluster actually created. Instead, we need to obtain the backing index and extract the desired index name from there. Fixes elastic#123086 Relates elastic#123376
nielsbauman
added a commit
to nielsbauman/elasticsearch
that referenced
this issue
Feb 26, 2025
When these tests were run around midnight, the use of `DataStream#getDefaultBackingIndexName` could result in a potential mismatch in the generated index name and the one that the cluster actually created. Instead, we need to obtain the backing index and extract the desired index name from there. Fixes elastic#123086 Relates elastic#123376 (cherry picked from commit f0f0eeb) # Conflicts: # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesDataStreamsIT.java
nielsbauman
added a commit
to nielsbauman/elasticsearch
that referenced
this issue
Feb 26, 2025
When these tests were run around midnight, the use of `DataStream#getDefaultBackingIndexName` could result in a potential mismatch in the generated index name and the one that the cluster actually created. Instead, we need to obtain the backing index and extract the desired index name from there. Fixes elastic#123086 Relates elastic#123376 (cherry picked from commit f0f0eeb) # Conflicts: # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesDataStreamsIT.java
nielsbauman
added a commit
to nielsbauman/elasticsearch
that referenced
this issue
Feb 26, 2025
When these tests were run around midnight, the use of `DataStream#getDefaultBackingIndexName` could result in a potential mismatch in the generated index name and the one that the cluster actually created. Instead, we need to obtain the backing index and extract the desired index name from there. Fixes elastic#123086 Relates elastic#123376 (cherry picked from commit f0f0eeb) # Conflicts: # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesDataStreamsIT.java
nielsbauman
added a commit
to nielsbauman/elasticsearch
that referenced
this issue
Feb 26, 2025
When these tests were run around midnight, the use of `DataStream#getDefaultBackingIndexName` could result in a potential mismatch in the generated index name and the one that the cluster actually created. Instead, we need to obtain the backing index and extract the desired index name from there. Fixes elastic#123086 Relates elastic#123376 (cherry picked from commit f0f0eeb) # Conflicts: # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesDataStreamsIT.java
elasticsearchmachine
pushed a commit
that referenced
this issue
Feb 26, 2025
When these tests were run around midnight, the use of `DataStream#getDefaultBackingIndexName` could result in a potential mismatch in the generated index name and the one that the cluster actually created. Instead, we need to obtain the backing index and extract the desired index name from there. Fixes #123086 Relates #123376
nielsbauman
added a commit
that referenced
this issue
Feb 26, 2025
…3472) When these tests were run around midnight, the use of `DataStream#getDefaultBackingIndexName` could result in a potential mismatch in the generated index name and the one that the cluster actually created. Instead, we need to obtain the backing index and extract the desired index name from there. Fixes #123086 Relates #123376
elasticsearchmachine
pushed a commit
that referenced
this issue
Feb 26, 2025
…23475) * Fix failing test(s) in `TimeSeriesDataStreamsIT` (#123378) When these tests were run around midnight, the use of `DataStream#getDefaultBackingIndexName` could result in a potential mismatch in the generated index name and the one that the cluster actually created. Instead, we need to obtain the backing index and extract the desired index name from there. Fixes #123086 Relates #123376 (cherry picked from commit f0f0eeb) # Conflicts: # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesDataStreamsIT.java * Fix compilation
elasticsearchmachine
pushed a commit
that referenced
this issue
Feb 26, 2025
…23473) * Fix failing test(s) in `TimeSeriesDataStreamsIT` (#123378) When these tests were run around midnight, the use of `DataStream#getDefaultBackingIndexName` could result in a potential mismatch in the generated index name and the one that the cluster actually created. Instead, we need to obtain the backing index and extract the desired index name from there. Fixes #123086 Relates #123376 (cherry picked from commit f0f0eeb) # Conflicts: # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesDataStreamsIT.java * Fix compilation
nielsbauman
added a commit
that referenced
this issue
Feb 27, 2025
…23474) When these tests were run around midnight, the use of `DataStream#getDefaultBackingIndexName` could result in a potential mismatch in the generated index name and the one that the cluster actually created. Instead, we need to obtain the backing index and extract the desired index name from there. Fixes #123086 Relates #123376
This was referenced Mar 4, 2025
nielsbauman
added a commit
to nielsbauman/elasticsearch
that referenced
this issue
Apr 25, 2025
…ests We replace usages of time sensitive `DataStream#getDefaultBackingIndexName` with the retrieval of the name via an API call. The problem with using the time sensitive method is that we can have test failures around midnight. Relates elastic#123376
nielsbauman
added a commit
to nielsbauman/elasticsearch
that referenced
this issue
Apr 29, 2025
…ests (elastic#127384) We replace usages of time sensitive `DataStream#getDefaultBackingIndexName` with the retrieval of the name via an API call. The problem with using the time sensitive method is that we can have test failures around midnight. Relates elastic#123376
nielsbauman
added a commit
to nielsbauman/elasticsearch
that referenced
this issue
Apr 30, 2025
…ests (elastic#127384) We replace usages of time sensitive `DataStream#getDefaultBackingIndexName` with the retrieval of the name via an API call. The problem with using the time sensitive method is that we can have test failures around midnight. Relates elastic#123376
nielsbauman
added a commit
to nielsbauman/elasticsearch
that referenced
this issue
Apr 30, 2025
…ests (elastic#127384) We replace usages of time sensitive `DataStream#getDefaultBackingIndexName` with the retrieval of the name via an API call. The problem with using the time sensitive method is that we can have test failures around midnight. Relates elastic#123376
nielsbauman
added a commit
that referenced
this issue
May 3, 2025
We replace usages of time sensitive `DataStream#getDefaultBackingIndexName` with the retrieval of the name via an API call. The problem with using the time sensitive method is that we can have test failures around midnight. Relates #123376
nielsbauman
added a commit
to nielsbauman/elasticsearch
that referenced
this issue
May 5, 2025
We replace usages of time sensitive `DataStream#getDefaultBackingIndexName` with the retrieval of the name via an API call. The problem with using the time sensitive method is that we can have test failures around midnight. Relates elastic#123376
nielsbauman
added a commit
to nielsbauman/elasticsearch
that referenced
this issue
May 5, 2025
We replace usages of time sensitive `DataStream#getDefaultBackingIndexName` with the retrieval of the name via an API call. The problem with using the time sensitive method is that we can have test failures around midnight. Relates elastic#123376
nielsbauman
added a commit
to nielsbauman/elasticsearch
that referenced
this issue
May 5, 2025
We replace usages of time sensitive `DataStream#getDefaultBackingIndexName` with the retrieval of the name via an API call. The problem with using the time sensitive method is that we can have test failures around midnight. Relates elastic#123376
nielsbauman
added a commit
that referenced
this issue
May 6, 2025
) We replace usages of time sensitive `DataStream#getDefaultBackingIndexName` with the retrieval of the name via an API call. The problem with using the time sensitive method is that we can have test failures around midnight. Relates #123376
parkertimmins
pushed a commit
to parkertimmins/elasticsearch
that referenced
this issue
May 7, 2025
…tic#127693) We replace usages of time sensitive `DataStream#getDefaultBackingIndexName` with the retrieval of the name via an API call. The problem with using the time sensitive method is that we can have test failures around midnight. Relates elastic#123376
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
:Data Management/Data streams
Data streams and their lifecycles
Team:Data Management
Meta label for data/management team
>test
Issues or PRs that are addressing/adding tests
We've already seen several test failures that were caused by (integration) test usages of
DataStream#getDefaultBackingIndexName
. The danger is that when a test runs around midnight, the test cluster might create a data stream backing index using dayX
and the test that callsgetDefaultBackingIndexName
uses dayX + 1
because it executed a few milliseconds later. That causes the test to look for a backing index that will never exist.The solution is straightforward: retrieve the list of backing indices from the data stream and extract the backing index name from that list.
Integration tests
elasticsearch.modules.data-streams.internalClusterTest
(19 usages found) Remove test usages ofgetDefaultBackingIndexName
in DS and LogsDB tests #127384elasticsearch.x-pack.plugin.ilm.internalClusterTest
(2 usages found) Remove test usages ofDataStream#getDefaultBackingIndexName
in ILM integration tests #124319elasticsearch.x-pack.plugin.ilm.qa.multi-node.javaRestTest
(10 usages found) Remove test usages ofDataStream#getDefaultBackingIndexName
in ILM integration tests #124319elasticsearch.x-pack.plugin.logsdb.javaRestTest
(3 usages found) Remove test usages ofgetDefaultBackingIndexName
in DS and LogsDB tests #127384elasticsearch.x-pack.plugin.logsdb.qa.with-basic.javaRestTest
Remove test usages ofgetDefaultBackingIndexName
in DS and LogsDB tests #127384elasticsearch.x-pack.plugin.ccr.javaRestTest
(3 usages found) Remove test usages ofgetDefaultBackingIndexName
in CCR tests #127693Unit tests
Unit tests do not fail that often because they are much faster, but it would be good to check that this method is not used multiple times in a unit test or it is replaced by the
getDefaultBackingIndexName
that uses the provided timestampelasticsearch.modules.data-streams.test
(50 usages found)elasticsearch.server.test
(106 usages found)elasticsearch.x-pack.plugin.ccr.qa.multi-cluster.test
(3 usages found)elasticsearch.x-pack.plugin.ccr.test
(19 usages found)elasticsearch.x-pack.plugin.core.test
(3 usages found)elasticsearch.x-pack.plugin.logsdb.test
(18 usages found)elasticsearch.x-pack.plugin.ml.test
(1 usage found)elasticsearch.x-pack.plugin.security.test
(8 usages found)Not all the usages above are incorrect. But this can be used to track the progress.
The text was updated successfully, but these errors were encountered: