Skip to content

Commit

Permalink
[Heartbeat] Add nil check to diagnostics processor serializer (#35698) (
Browse files Browse the repository at this point in the history
#35713)

* Add nil check to diagnostics processor serializer

* Add changelog

(cherry picked from commit c81e9b2)

Co-authored-by: Emilio Alvarez Piñeiro <[email protected]>
  • Loading branch information
mergify[bot] and emilioalvap authored Jun 8, 2023
1 parent 2fd7f04 commit a1bf8b8
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,34 @@ automatic splitting at root level, if root level element is an array. {pull}3415
- Fixing the grok expression outputs of log files {pull}35221[35221]
- Fix handling of IPv6 unspecified addresses in TCP input. {issue}35064[35064] {pull}35637[35637]

*Heartbeat*

- Fix panics when parsing dereferencing invalid parsed url. {pull}34702[34702]
- Fix broken zip URL monitors. NOTE: Zip URL Monitors will be removed in version 8.7 and replaced with project monitors. {pull}33723[33723]
- Fix integration hashing to prevent reloading all when updated. {pull}34697[34697]
- Fix release of job limit semaphore when context is cancelled. {pull}34697[34697]
- Fix bug where states.duration_ms was incorrect type. {pull}33563[33563]
- Fix handling of long UDP messages in UDP input. {issue}33836[33836] {pull}33837[33837]
- Fix browser monitor summary reporting as up when monitor is down. {issue}33374[33374] {pull}33819[33819]
- Fix beat capabilities on Docker image. {pull}33584[33584]
- Fix serialization of state duration to avoid scientific notation. {pull}34280[34280]
- Enable nodejs engine strict validation when bundling synthetics. {pull}34470[34470]
with the ecs field name `container`. {pull}34403[34403]
automatic splitting at root level, if root level element is an array. {pull}34155[34155]
- Fix broken mapping for state.ends field. {pull}34891[34891]
- Fix issue using projects in airgapped environments by disabling npm audit. {pull}34936[34936]
- Fix broken state ID location naming. {pull}35336[35336]
- Fix project monitor temp directories permission to include group access. {pull}35398[35398]
- Fix output pipeline exit on run_once. {pull}35376[35376]
- Fix formatting issue with socket trace timeout. {pull}35434[35434]
- Fix serialization of processors when running diagnostics. {pull}35698[35698]

*Heartbeat*


*Heartbeat*


*Heartbeat*


Expand Down
8 changes: 6 additions & 2 deletions libbeat/publisher/processing/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,13 @@ func newBuilder(
// Processors returns a string description of the processor config
func (b *builder) Processors() []string {
procList := []string{}
for _, proc := range b.processors.list {
procList = append(procList, proc.String())

if b.processors != nil {
for _, proc := range b.processors.list {
procList = append(procList, proc.String())
}
}

return procList
}

Expand Down
8 changes: 8 additions & 0 deletions libbeat/publisher/processing/default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,14 @@ func TestProcessingClose(t *testing.T) {
assert.True(t, factoryProcessor.closed)
}

func TestProcessingDiagnostics(t *testing.T) {
factory, err := MakeDefaultSupport(true, nil)(beat.Info{}, logp.L(), config.NewConfig())
require.NoError(t, err)

p := factory.Processors()
assert.Empty(t, p)
}

func fromJSON(in string) mapstr.M {
var tmp mapstr.M
err := json.Unmarshal([]byte(in), &tmp)
Expand Down

0 comments on commit a1bf8b8

Please sign in to comment.