forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
861 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 97401 | ||
summary: Fix transform incorrectly calculating date bucket on updating old data | ||
area: Transform | ||
type: bug | ||
issues: | ||
- 97101 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...sticsearch/xpack/core/application/EnterpriseSearchFeatureSetUsageBWCSerializingTests.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
package org.elasticsearch.xpack.core.application; | ||
|
||
import org.elasticsearch.TransportVersion; | ||
import org.elasticsearch.common.io.stream.Writeable; | ||
import org.elasticsearch.xpack.core.ml.AbstractBWCWireSerializationTestCase; | ||
|
||
import java.io.IOException; | ||
import java.util.Map; | ||
|
||
import static org.elasticsearch.xpack.core.application.EnterpriseSearchFeatureSetUsage.BEHAVIORAL_ANALYTICS_TRANSPORT_VERSION; | ||
import static org.elasticsearch.xpack.core.application.EnterpriseSearchFeatureSetUsage.QUERY_RULES_TRANSPORT_VERSION; | ||
|
||
public class EnterpriseSearchFeatureSetUsageBWCSerializingTests extends AbstractBWCWireSerializationTestCase< | ||
EnterpriseSearchFeatureSetUsage> { | ||
|
||
@Override | ||
protected EnterpriseSearchFeatureSetUsage createTestInstance() { | ||
Map<String, Object> searchApplicationsStats = Map.of(EnterpriseSearchFeatureSetUsage.COUNT, randomLongBetween(0, 100000)); | ||
Map<String, Object> analyticsCollectionsStats = Map.of(EnterpriseSearchFeatureSetUsage.COUNT, randomLongBetween(0, 100000)); | ||
Map<String, Object> queryRulesStats = Map.of(EnterpriseSearchFeatureSetUsage.COUNT, randomLongBetween(0, 100000)); | ||
return new EnterpriseSearchFeatureSetUsage(true, true, searchApplicationsStats, analyticsCollectionsStats, queryRulesStats); | ||
} | ||
|
||
@Override | ||
protected EnterpriseSearchFeatureSetUsage mutateInstance(EnterpriseSearchFeatureSetUsage instance) throws IOException { | ||
return randomValueOtherThan(instance, this::createTestInstance); | ||
} | ||
|
||
@Override | ||
protected Writeable.Reader<EnterpriseSearchFeatureSetUsage> instanceReader() { | ||
return EnterpriseSearchFeatureSetUsage::new; | ||
} | ||
|
||
@Override | ||
protected EnterpriseSearchFeatureSetUsage mutateInstanceForVersion(EnterpriseSearchFeatureSetUsage instance, TransportVersion version) { | ||
if (version.onOrAfter(QUERY_RULES_TRANSPORT_VERSION)) { | ||
return instance; | ||
} else if (version.onOrAfter(BEHAVIORAL_ANALYTICS_TRANSPORT_VERSION)) { | ||
return new EnterpriseSearchFeatureSetUsage( | ||
true, | ||
true, | ||
instance.getSearchApplicationsUsage(), | ||
instance.getAnalyticsCollectionsUsage(), | ||
Map.of() | ||
); | ||
} else { | ||
return new EnterpriseSearchFeatureSetUsage(true, true, instance.getSearchApplicationsUsage(), Map.of(), Map.of()); | ||
} | ||
} | ||
} |
47 changes: 0 additions & 47 deletions
47
...elasticsearch/xpack/core/application/EnterpriseSearchFeatureSetUsageSerializingTests.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.