Skip to content

Commit

Permalink
Enable overwriting ingest pipelines by default. (#2273)
Browse files Browse the repository at this point in the history
Enable `apm-server.register.ingest.pipeline.overwrite` by default,
as described in `apm-server.yml`.

fixes #2272
  • Loading branch information
simitt committed Jun 12, 2019
1 parent ae66184 commit d448f98
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion beater/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,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 @@ -290,7 +290,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 @@ -4,6 +4,7 @@
[float]
==== Bug fixes
- Require client authentication by default when `apm-server.ssl.enabled` is true {pull}2224[2224].
- 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

0 comments on commit d448f98

Please sign in to comment.