Skip to content

Commit

Permalink
Enable overwriting ingest pipelines by default. (#2273) (#2277)
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 26, 2019
1 parent 7643ebe commit 7528526
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion beater/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,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
12 changes: 10 additions & 2 deletions changelogs/7.2.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,21 @@

https://github.com/elastic/apm-server/compare/7.1\...7.2[View commits]

* <<release-notes-7.2.1>>
* <<release-notes-7.2.0>>

[[release-notes-7.2.1]]
=== APM Server version 7.2.1

https://github.com/elastic/apm-server/compare/v7.2.0\...v7.2.1[View commits]

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

[[release-notes-7.2.0]]
=== APM Server version 7.2.0

https://github.com/elastic/apm-server/compare/v7.1.0\...v7.2.0[View commits]

[float]
==== Added
- Make stacktrace lineno optional {pull}2105[2105].
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 7528526

Please sign in to comment.