Skip to content

Commit 9600ce9

Browse files
davidkyleomricohenn
authored andcommitted
[ML] Fix auditor test failures (elastic#125038)
1 parent ee7e9eb commit 9600ce9

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

muted-tests.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,6 @@ tests:
203203
issue: https://github.com/elastic/elasticsearch/issues/120964
204204
- class: org.elasticsearch.xpack.ml.integration.PyTorchModelIT
205205
issue: https://github.com/elastic/elasticsearch/issues/121165
206-
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
207-
method: test {p0=transform/*}
208-
issue: https://github.com/elastic/elasticsearch/issues/120816
209-
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
210-
method: test {p0=ml/*}
211-
issue: https://github.com/elastic/elasticsearch/issues/120816
212206
- class: org.elasticsearch.xpack.security.authc.ldap.ActiveDirectorySessionFactoryTests
213207
issue: https://github.com/elastic/elasticsearch/issues/121285
214208
- class: org.elasticsearch.env.NodeEnvironmentTests

x-pack/plugin/build.gradle

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,17 @@ tasks.named("yamlRestCompatTestTransform").configure({ task ->
111111
task.skipTest("esql/40_tsdb/from index pattern unsupported counter", "TODO: support for subset of metric fields")
112112
task.skipTest("esql/40_unsupported_types/unsupported", "TODO: support for subset of metric fields")
113113
task.skipTest("esql/40_unsupported_types/unsupported with sort", "TODO: support for subset of metric fields")
114+
task.skipTest("ml/3rd_party_deployment/Test clear deployment cache", "Deprecated route removed")
115+
task.skipTest("ml/3rd_party_deployment/Test start and stop deployment with cache", "Deprecated route removed")
116+
task.skipTest("ml/3rd_party_deployment/Test start and stop multiple deployments", "Deprecated route removed")
117+
task.skipTest("ml/3rd_party_deployment/Test update model alias on pytorch model to undeployed model", "Deprecated route removed")
118+
task.skipTest("ml/job_cat_apis/Test cat anomaly detector jobs", "Flush API is deprecated")
119+
task.skipTest("ml/jobs_get_stats/Test get job stats after uploading data prompting the creation of some stats", "Flush API is deprecated")
120+
task.skipTest("ml/jobs_get_stats/Test get job stats for closed job", "Flush API is deprecated")
121+
task.skipTest("ml/inference_crud/Test deprecation of include model definition param", "Query parameter removed")
122+
task.skipTest("ml/post_data/Test flush and close job WITHOUT sending any data", "Flush API is deprecated")
123+
task.skipTest("ml/post_data/Test flush with skip_time", "Flush API is deprecated")
124+
task.skipTest("ml/post_data/Test POST data job api, flush, close and verify DataCounts doc", "Flush API is deprecated")
114125
task.replaceValueInMatch("Size", 49, "Test flamegraph from profiling-events")
115126
task.replaceValueInMatch("Size", 49, "Test flamegraph from test-events")
116127
})

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/common/notifications/AbstractAuditor.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,9 @@ public void error(String resourceId, String message) {
9898
*/
9999
public void reset() {
100100
indexAndAliasCreated.set(false);
101-
if (backlog == null) {
102-
// create a new backlog in case documents need
103-
// to be temporarily stored when the new index/alias is created
104-
backlog = new ConcurrentLinkedQueue<>();
105-
}
101+
// create a new backlog in case documents need
102+
// to be temporarily stored when the new index/alias is created
103+
backlog = new ConcurrentLinkedQueue<>();
106104
}
107105

108106
private static void onIndexResponse(DocWriteResponse response) {
@@ -134,14 +132,13 @@ protected void indexDoc(ToXContent toXContent) {
134132
if (indexAndAliasCreated.get() == false) {
135133
// synchronized so that hasLatestTemplate does not change value
136134
// between the read and adding to the backlog
137-
assert backlog != null;
138135
if (backlog != null) {
139136
if (backlog.size() >= MAX_BUFFER_SIZE) {
140137
backlog.remove();
141138
}
142139
backlog.add(toXContent);
143140
} else {
144-
logger.error("Latest audit template missing and audit message cannot be added to the backlog");
141+
logger.error("Audit message cannot be added to the backlog");
145142
}
146143

147144
// stop multiple invocations
@@ -186,7 +183,6 @@ protected void clearBacklog() {
186183
}
187184

188185
protected void writeBacklog() {
189-
assert backlog != null;
190186
if (backlog == null) {
191187
logger.debug("Message back log has already been written");
192188
return;

0 commit comments

Comments
 (0)