gobridge

0025 — Ignore unknown fields in a configuration document the bridge stored

Status: accepted Date: 2026-10-15 Deciders: GoBridge core Relates to: 0013 (the last-committed config artifact), 0016 (the content digest)

Context

The parser refuses every field it does not know

config/parser.Parse reads a configuration document in two stages, and both refuse a field they do not know:

This exists to catch a typo. shutdown_timout: 30s is refused instead of running with the default the person did not mean.

Three documents are written by the bridge and read back later

The release that reads a document is not always the release that stored it. During a rolling deploy, tasks of two releases read the same row. After a rollback, the older release reads what the newer release wrote. A release that adds a field writes it into the document. A field without omitempty, which is most plugin options, is written into every document the release stores, and a field with omitempty whenever it is set. The older release then refuses the whole document: the DynamoDB source reports dynamodb config load: parse, the task does not start or reload, and a joining cluster member cannot rebuild the committed configuration.

An unknown field in a stored document is not a typo

This holds for the DynamoDB document and the rollout artifact, which no person edits. Each of them reaches storage through one of two writers:

So an unknown field in one of those two documents means another release wrote it. Refusing it protects nothing and stops a bridge that could run the document. The file config store is the exception: people edit that file by hand, so an unknown key in it may be a typo.

Decision

A configuration document the bridge stored, other than the file config store, is read leniently: an unknown field is ignored at every level, plugin options included. A document a person writes, the file config store included, is still read strictly.

1. One parser option

parser.Parse takes functional options. parser.WithIgnoreUnknownFields():

No plugin changes. A decoder that decodes through RawConfig.Decode ignores an unknown option under the option and refuses it without.

2. What stays refused

The option ignores unknown fields and nothing else. These are still refused:

3. Who reads leniently

Exactly two readers pass the option:

Every other reader stays strict: parser.ParseFile, the file config source and its watcher, the file config store, parser.NewInlineSource and the embedded initial document, the admin API, and the CDK configuration source.

Consequences

Rejected alternatives