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

minor updates for user-agent ecs for 6.7 #39213

Merged
merged 5 commits into from
Feb 21, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public IngestDocument execute(IngestDocument ingestDocument) {
}
}
} else {
// Deprecated format, removed in 7.0
// Deprecated format, removed in 8.0
for (Property property : this.properties) {
switch (property) {
case NAME:
Expand Down Expand Up @@ -316,7 +316,7 @@ public UserAgentProcessor create(Map<String, Processor.Factory> factories, Strin

if (useECS == false) {
deprecationLogger.deprecated("setting [ecs] to false for non-common schema " +
"format is deprecated and will be removed in 7.0, set to true to use the non-deprecated format");
"format is deprecated and will be removed in 8.0, set to true to use the non-deprecated format");
}

return new UserAgentProcessor(processorTag, field, targetField, parser, properties, ignoreMissing, useECS);
Expand All @@ -326,12 +326,12 @@ public UserAgentProcessor create(Map<String, Processor.Factory> factories, Strin
enum Property {

NAME,
// Deprecated in 6.7 (superceded by VERSION), to be removed in 7.0
// Deprecated in 6.7 (superceded by VERSION), to be removed in 8.0
@Deprecated MAJOR,
@Deprecated MINOR,
@Deprecated PATCH,
OS,
// Deprecated in 6.7 (superceded by just using OS), to be removed in 7.0
// Deprecated in 6.7 (superceded by just using OS), to be removed in 8.0
@Deprecated OS_NAME,
@Deprecated OS_MAJOR,
@Deprecated OS_MINOR,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ static DeprecationIssue checkUserAgentPipelines(ClusterState state) {
.filter(Objects::nonNull)
.filter(processor -> processor.containsKey("user_agent"))
.map(processor -> processor.get("user_agent"))
.anyMatch(processorConfig ->
false == ConfigurationUtils.readBooleanProperty(null, null, processorConfig, "ecs", false));
.anyMatch(processorConfig -> processorConfig.containsKey("ecs") == false);
})
.map(PipelineConfiguration::getId)
.sorted() // Make the warning consistent for testing purposes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public void testUserAgentEcsCheck() {
"User-Agent ingest plugin will use ECS-formatted output",
"https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html" +
"#ingest-user-agent-ecs-always",
"Ingest pipelines [ecs_false, ecs_null] will change to using ECS output format in 7.0");
"Ingest pipelines [ecs_null] will change to using ECS output format in 7.0");
jakelandis marked this conversation as resolved.
Show resolved Hide resolved
assertEquals(singletonList(expected), issues);
}
}