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

Enable overwriting ingest pipelines by default. #2273

Merged
merged 2 commits into from
Jun 12, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion beater/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func (c *pipelineConfig) isEnabled() bool {
}

func (c *pipelineConfig) shouldOverwrite() bool {
return c != nil && (c.Overwrite != nil && *c.Overwrite)
return c != nil && (c.Overwrite == nil || *c.Overwrite)
}

func (c *rumConfig) memoizedSmapMapper() (sourcemap.Mapper, error) {
Expand Down
2 changes: 1 addition & 1 deletion beater/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ func TestPipeline(t *testing.T) {
enabled, overwrite bool
}{
{c: nil, enabled: false, overwrite: false},
{c: &pipelineConfig{}, enabled: false, overwrite: false},
{c: &pipelineConfig{}, enabled: false, overwrite: true}, //default values
{c: &pipelineConfig{Enabled: &falsy, Overwrite: &truthy},
enabled: false, overwrite: true},
{c: &pipelineConfig{Enabled: &truthy, Overwrite: &falsy},
Expand Down
1 change: 1 addition & 0 deletions changelogs/head.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

[float]
==== Bug fixes
- Set `apm-server.register.ingest.pipeline.overwrite` to true by default {pull}2273[2273]

[float]
==== Added
Expand Down
2 changes: 1 addition & 1 deletion tests/system/test_pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ def test_setup_pipelines(self):


class PipelineRegisterTest(ElasticTest):
# pipeline.overwrite should be enabled by default.
config_overrides = {
"register_pipeline_enabled": "true",
"register_pipeline_overwrite": "true"
}

@unittest.skipUnless(INTEGRATION_TESTS, "integration test")
Expand Down