Skip to content

chore(deps): track fork's upstream config layout - #695

Open
yuri-tceretian wants to merge 3 commits into
mainfrom
yuri-tseretyan/track-fork-config-layout
Open

yuri-tceretian wants to merge 3 commits into
mainfrom
yuri-tseretyan/track-fork-config-layout

Conversation

@yuri-tceretian

@yuri-tceretian yuri-tceretian commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Why does bumping the fork require touching this many files, if nothing changes behaviour?

grafana/prometheus-alertmanager#165 moved the fork's config types into upstream v0.34.0's layout, so future upstream syncs compare file by file. Shared types (NotifierConfig, URL, SecretURL, Matchers, InhibitRule, …) moved to config/common. Eight notifier configs moved into their notify/<channel> packages. Nothing was aliased, so every reference here needs a new qualifier.

Two commits, so the bump and its fallout review separately:

  1. Bump the fork in the root module and apps/historian to 27a6d009. This doesn't compile alone.
  2. Update qualifiers. The only non-rename change is four conversions in definition/compat/receiver_compat.go. The pagerduty, OpsGenie and Telegram secret fields are now commoncfg.Secret, matching upstream, and a config.Secret value no longer assigns to them.

No config field, schema, default or validation changes. The JSON encoders in receivers/v0mimir_json.go are registered for the relocated types, so serialized output is unchanged.

The config relocation also explains the new indirect dependencies in go.mod. Go compiles the whole imported package: importing notify/jira for JiraConfig, for example, also compiles the Jira notifier implementation. Previously those config types lived in config, without pulling in the notifier implementations.

  • notify/jira pulls in github.com/trivago/tgo.
  • notify/telegram pulls in gopkg.in/telebot.v3.
  • notify/pagerduty pulls in github.com/alecthomas/units.
  • notify/webhook pulls in Alertmanager's tracing package, which imports otelhttp and otelhttptrace; otelhttp also pulls in github.com/felixge/httpsnoop.

The root module already listed all of these except trivago/tgo, so it gains one indirect requirement. apps/historian gains all six. These dependencies follow from moving config types into the notifier packages; they do not represent additional features introduced by this PR.

Part of #694

🤖 Generated with Claude Code

Picks up grafana/prometheus-alertmanager#165, which mirrors upstream's
config package layout (shared types moved to config/common, several
notifier configs moved to notify/<channel>). This module will not
compile until the fallout is fixed in a follow-up commit.

Ref: #694
Update qualifiers for types that moved with grafana/prometheus-alertmanager#165:
NotifierConfig, URL, SecretURL, MatchRegexps, Matchers and InhibitRule now
live in config/common; DiscordConfig, WebhookConfig, MSTeamsConfig,
MSTeamsV2Config, JiraConfig, PagerdutyConfig (and PagerdutyImage/Link),
OpsGenieConfig (and OpsGenieConfigResponder) and TelegramConfig now live in
their respective notify/<channel> packages. PagerDuty ServiceKey/RoutingKey,
OpsGenie APIKey and Telegram BotToken are now commoncfg.Secret instead of
the fork's own config.Secret.

No behavior change: same fields, same JSON/YAML output, only import paths
and type qualifiers differ.

Ref: #694
@yuri-tceretian
yuri-tceretian marked this pull request as ready for review October 6, 2026 19:16
@yuri-tceretian
yuri-tceretian requested a review from a team as a code owner October 6, 2026 19:16
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.

2 participants