Skip to content

Commit

Permalink
Enable overwriting ingest pipelines by default. (elastic#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 elastic#2272
  • Loading branch information
simitt committed Jun 12, 2019
1 parent 89c0cb5 commit 44f6aac
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/7.2.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ https://github.com/elastic/apm-server/compare/v7.1.0\...v7.2.0[View commits]
[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 44f6aac

Please sign in to comment.