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

Bump allow duplicates version check to 7.11 #21556

Merged
merged 1 commit into from
Oct 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions filebeat/fileset/modules_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ func TestLoadPipeline(t *testing.T) {

content := map[string]interface{}{
"description": "describe pipeline",
"processors": []map[string]interface{}{
{
"processors": []interface{}{
map[string]interface{}{
"set": map[string]interface{}{
"field": "foo",
"value": "bar",
Expand Down
2 changes: 1 addition & 1 deletion filebeat/fileset/pipelines.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ func modifySetProcessor(esVersion common.Version, pipelineID string, content map
// modifyAppendProcessor replaces allow_duplicates option with an if statement
// so ES less than 7.10 will still work
func modifyAppendProcessor(esVersion common.Version, pipelineID string, content map[string]interface{}) error {
flagVersion := common.MustNewVersion("7.10.0")
flagVersion := common.MustNewVersion("7.11.0")
if !esVersion.LessThan(flagVersion) {
return nil
}
Expand Down
16 changes: 8 additions & 8 deletions filebeat/fileset/pipelines_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ func TestModifyAppendProcessor(t *testing.T) {
isErrExpected bool
}{
{
name: "ES < 7.10.0: set to true",
name: "ES < 7.11.0: set to true",
esVersion: common.MustNewVersion("7.9.0"),
content: map[string]interface{}{
"processors": []interface{}{
Expand All @@ -427,7 +427,7 @@ func TestModifyAppendProcessor(t *testing.T) {
isErrExpected: false,
},
{
name: "ES < 7.10.0: set to false",
name: "ES < 7.11.0: set to false",
esVersion: common.MustNewVersion("7.9.0"),
content: map[string]interface{}{
"processors": []interface{}{
Expand All @@ -453,8 +453,8 @@ func TestModifyAppendProcessor(t *testing.T) {
isErrExpected: false,
},
{
name: "ES == 7.10.0",
esVersion: common.MustNewVersion("7.10.0"),
name: "ES == 7.11.0",
esVersion: common.MustNewVersion("7.11.0"),
content: map[string]interface{}{
"processors": []interface{}{
map[string]interface{}{
Expand All @@ -479,7 +479,7 @@ func TestModifyAppendProcessor(t *testing.T) {
isErrExpected: false,
},
{
name: "ES > 7.10.0",
name: "ES > 7.11.0",
esVersion: common.MustNewVersion("8.0.0"),
content: map[string]interface{}{
"processors": []interface{}{
Expand All @@ -505,7 +505,7 @@ func TestModifyAppendProcessor(t *testing.T) {
isErrExpected: false,
},
{
name: "ES < 7.10.0: existing if",
name: "ES < 7.11.0: existing if",
esVersion: common.MustNewVersion("7.7.7"),
content: map[string]interface{}{
"processors": []interface{}{
Expand All @@ -531,7 +531,7 @@ func TestModifyAppendProcessor(t *testing.T) {
isErrExpected: false,
},
{
name: "ES < 7.10.0: existing if with contains",
name: "ES < 7.11.0: existing if with contains",
esVersion: common.MustNewVersion("7.7.7"),
content: map[string]interface{}{
"processors": []interface{}{
Expand All @@ -557,7 +557,7 @@ func TestModifyAppendProcessor(t *testing.T) {
isErrExpected: false,
},
{
name: "ES < 7.10.0: no value",
name: "ES < 7.11.0: no value",
esVersion: common.MustNewVersion("7.7.7"),
content: map[string]interface{}{
"processors": []interface{}{
Expand Down