Skip to content

chore: remove ingest.enabled config#6873

Merged
javiermolinar merged 4 commits intografana:mainfrom
javiermolinar:remove-ingest-enabled-config
Apr 8, 2026
Merged

chore: remove ingest.enabled config#6873
javiermolinar merged 4 commits intografana:mainfrom
javiermolinar:remove-ingest-enabled-config

Conversation

@javiermolinar
Copy link
Copy Markdown
Contributor

@javiermolinar javiermolinar commented Apr 8, 2026

What this PR does:

  • Remove ingest.enabled config. This config is no longer needed since it was used to transition from the old architecture to the new one

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Copilot AI review requested due to automatic review settings April 8, 2026 09:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the legacy ingest.enabled YAML config from Tempo’s ingest configuration and updates code/docs/examples to rely on Kafka ingest configuration (notably ingest.kafka.topic) as the enablement signal.

Changes:

  • Remove ingest.enabled from pkg/ingest.Config and update ingester code to use a helper (ingestStorageEnabled) instead of the removed field.
  • Add strict YAML unmarshal tests to ensure legacy enabled (and other unknown fields) are rejected and that defaults are preserved.
  • Update docs/examples/manifests and add a changelog entry documenting the breaking config removal.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/ingest/config.go Removes the deprecated Enabled field from ingest config.
pkg/ingest/config_test.go Adds strict YAML unmarshal tests for legacy/unknown fields and default preservation.
modules/ingester/ingester.go Switches gating from cfg.IngestStorageConfig.Enabled to ingestStorageEnabled(...).
modules/ingester/downscale.go Updates downscale handler gating to use ingestStorageEnabled(...).
modules/ingester/config.go Introduces ingestStorageEnabled helper (topic-based enablement).
modules/generator/AGENTS.md Removes mention of deprecated ingest.enabled.
integration/util/config-base.yaml Drops ingest.enabled from integration base config.
example/nomad/tempo-distributed/config.yml Drops ingest.enabled from example config.
example/docker-compose/single-binary/tempo.yaml Drops ingest.enabled from example config.
example/docker-compose/multitenant/tempo.yaml Drops ingest.enabled from example config.
example/docker-compose/distributed/tempo.yaml Drops ingest.enabled from example config.
example/docker-compose/debug/tempo.yaml Drops ingest.enabled from example config.
docs/sources/tempo/configuration/manifest.md Removes ingest.enabled from the published config manifest.
CHANGELOG.md Adds a [CHANGE] entry for removing ingest.enabled.

Comment on lines +37 to +38
func ingestStorageEnabled(cfg ingest.Config) bool {
return cfg.Kafka.Topic != ""
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ingestStorageEnabled takes ingest.Config by value, which copies the full KafkaConfig (including secret fields and other nested config) each time it’s called. Could this take *ingest.Config (or just the topic string) instead to avoid unnecessary copying and make it clear the helper is read-only?

Suggested change
func ingestStorageEnabled(cfg ingest.Config) bool {
return cfg.Kafka.Topic != ""
func ingestStorageEnabled(cfg *ingest.Config) bool {
return cfg != nil && cfg.Kafka.Topic != ""

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just to make this thing build. Ingesters are about to disappear

Comment thread pkg/ingest/config_test.go Outdated
Comment on lines +15 to +39
func TestConfigUnmarshalYAMLRejectsLegacyEnabled(t *testing.T) {
var cfg Config

err := yaml.UnmarshalStrict([]byte(`
enabled: false
kafka:
address: localhost:9092
topic: tempo
`), &cfg)
require.Error(t, err)
require.Contains(t, err.Error(), "field enabled not found")
}

func TestConfigUnmarshalYAMLStrictUnknownField(t *testing.T) {
var cfg Config

err := yaml.UnmarshalStrict([]byte(`
kafka:
address: localhost:9092
topic: tempo
unknown: true
`), &cfg)
require.Error(t, err)
require.Contains(t, err.Error(), "field unknown not found")
}
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests assert a specific YAML strict-unmarshal error string ("field … not found"). The exact wording can vary across yaml library versions, which can make the tests brittle. Would you consider asserting on the error type/details (eg *yaml.TypeError contents) or checking for a smaller invariant substring (like just the field name) instead?

Copilot uses AI. Check for mistakes.
Comment thread CHANGELOG.md Outdated
* [CHANGE] Deprecate metrics-generator no-local-blocks [#6707](https://github.com/grafana/tempo/pull/6707) (@javiermolinar)
* [CHANGE] Own local block and partition ring helpers [#6808](https://github.com/grafana/tempo/pull/6808) (@javiermolinar)
* [CHANGE] Track invalid trace and span id discards [#6799](https://github.com/grafana/tempo/pull/6799) (@javiermolinar)
* [CHANGE] Remove ingest.enabled config [#6873](https://github.com/grafana/tempo/pull/6873) (@javiermolinar)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll change it

Copilot AI review requested due to automatic review settings April 8, 2026 14:23
@javiermolinar javiermolinar enabled auto-merge (squash) April 8, 2026 14:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Comment thread CHANGELOG.md
Comment on lines 3 to 5
* [ENHANCEMENT] Expose MinIO retry settings via S3 config [#6561](https://github.com/grafana/tempo/pull/6561) (@rwhitty)
* [BUGFIX] Fix integer overflow in query parameters by using `strconv.ParseUint` instead of `strconv.Atoi`/`strconv.ParseInt` for unsigned integer fields. [#6612](https://github.com/grafana/tempo/pull/6612) (@bejaratommy)

* [CHANGE] **BREAKING CHANGE** Centralize block and WAL config: `block_builder` and `live_store` now always use `storage.trace.block` settings; per-module block config fields are removed. [#6647](https://github.com/grafana/tempo/pull/6647) (@stoewer)
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ## main / unreleased section now has an extra blank line between list items (line 4), and the first entry is an [ENHANCEMENT] that sits above the [CHANGE] block. Could we remove the blank line and keep entries grouped/sorted by type (CHANGE/FEATURE/ENHANCEMENT/BUGFIX) to match the checklist guidance and the rest of the file’s structure?

Copilot uses AI. Check for mistakes.
@javiermolinar javiermolinar merged commit 5e09b62 into grafana:main Apr 8, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants