Skip to content

[receiver/googlecloudpubsubpush] Default config fails round-trip validation #46996

Description

@iblancasa

Component(s)

receiver/googlecloudpubsubpush

What happened?

The googlecloudpubsubpush receiver currently has a default config that does not safely survive a full config round-trip through the Collector config system.

The issue is the encoding field. The default config leaves it unset, which is acceptable in the in-memory Go struct returned by CreateDefaultConfig(). But once that config is marshaled and then decoded again, the empty value is interpreted as an invalid component ID.

In practice, this shows up in generated config marshal tests as a decode failure like 'encoding' id must not be empty.

The default config shape becomes impossible to decode after a marshal/unmarshal cycle.

Collector version

main

Environment information

No response

OpenTelemetry Collector configuration

Log output

Additional context

Found while working on open-telemetry/opentelemetry-collector#14599

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions