You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #31047 from bartoszpiekny-redpanda/core-16775-unsupported-feature-diagnostics
cluster_link: unsupported schema-feature policy for SR shadow sync
Implements the unsupported_schema_feature_policy config (FAIL default /
REMOVE) for API-mode Schema Registry shadowing, so a migration from a
Confluent-compatible source handles schema features Redpanda cannot store (rule
sets, schema tags, metadata.tags). The tolerant SR client now returns a
structured source_schema_read { schema, unsupported[] } — each
unsupported_feature carrying a JSON pointer (/ruleSet, /metadata/tags) and
JSON type — which the source reader carries through to the reconciler, which
applies the configured policy at the single per-node import point. The client
opts into extended source fields via the Confluent-Accept-Unknown-Properties
header, and a small allow-list of server-assigned fields (guid, ts) is
dropped silently.
REMOVE imports only the supported projection, increments
unsupported_features_removed (surfaced in rpk shadow status and totals), and
logs the stripped fields to the broker log. FAIL (the default) treats an
unsupported schema as a per-item failure: it logs the offending fields, counts
an error, and skips that schema while the rest of the subjects still replicate;
the task stays active, and only global errors (source unavailable) fail-fast.
Note: FAIL deliberately deviates from the RFC, which describes it as aborting /
faulting the whole sync. Per-item handling collects all per-item errors rather
than stopping on the first offender and keeps replicating whatever the
destination can store — more useful for a migration. The offending
subject/version and which fields tripped the policy are written to the broker
log (logger shadow_link). Happy to revisit if reviewers prefer whole-sync
abort semantics.
Note: this covers the schema-fetch path only — the policy acts on per-schema
metadata/ruleSet (source_schema_read::unsupported). Config-borne
governance features (compatibilityGroup, default/override metadata & rule sets
on GET /config) are out of scope: config sync replicates only
compatibilityLevel and records the rest as dropped unknown_fields. No
proto/model/converter/rpk changes: the config contract, the counter, and rpk shadow status rendering already exist.
Tests: reconciler and mirroring-task unit/integration tests cover REMOVE (strip
count; no count on a failed import) and FAIL (count + skip the offender, sync
the rest, task stays active), plus diagnostics parsing (surfaced fields, ignored
guid/ts, Confluent-Accept-Unknown-Properties opt-in).
0 commit comments