Skip to content

TODO: bump avro & pkg/sr tags — Schema Registry support#57

Draft
twmb wants to merge 5 commits into
masterfrom
next
Draft

TODO: bump avro & pkg/sr tags — Schema Registry support#57
twmb wants to merge 5 commits into
masterfrom
next

Conversation

@twmb

@twmb twmb commented Jun 15, 2026

Copy link
Copy Markdown
Owner

TODO: bump avro & pkg/sr tags!

Before marking this ready: go get github.com/twmb/avro@<tag> and go get github.com/twmb/franz-go/pkg/sr@<tag>, then delete go.work + go.work.sum, drop their lines from .gitignore, run go mod tidy, set the CHANGELOG release date, and verify a clean-checkout go build ./... / go test ./....


Adds Schema Registry support to kcl, plus two smaller items:

  • Schema Registrykcl registry admin (subjects, schema create/get/list, references, delete, compatibility get/set/test, mode get/set, context list/delete); schema-aware produce/consume via a --schema / --key-schema spec DSL (id:N | subject[@ver] | subject:NAME[@ver] | topic[@ver], optional #message) and --decode (=key/=value); Avro, JSON Schema, and Protobuf, with transitive reference resolution. kcl fake --registry / --seed-demo serves an in-process registry. Closes feature: schema registry & avro support #2.
  • reassign cancel — cancel in-progress partition reassignments.
  • acl list — default the resource-type filter to any (was sending an invalid UNKNOWN filter). Fixes list ACLs failing #56.

Currently builds against the twmb/avro working tree via go.work, and franz-go pkg/sr at a master pseudo-version, until both are tagged (see TODO above).

twmb added 5 commits June 14, 2026 15:57
Cancel in-progress partition reassignments via AlterPartitionAssignments
with null replicas, reverting each partition to its prior replica set.
Requires explicit topic:partitions; does not cancel everything at once.
Also drops a dead empty-if in alter.
New 'kcl registry' command space over franz-go's pkg/sr: subjects,
versions, schema create/get/list, references, delete, compatibility
get/set/test, mode get/set, and context list/delete; scope to a context
with --context.

Schema-aware produce/consume:
- produce: --schema (value) / --key-schema (key) encode JSON into the
  registry wire format against an existing schema via a small spec
  (topic[@ver] | subject[@ver] | subject:NAME[@ver] | id:N, optional
  #message). Read-only; producing never registers.
- consume: --decode (=key/=value) decodes the wire format back to JSON.
- Avro (twmb/avro), JSON Schema, and Protobuf, including schemas that
  reference other registered schemas (resolved transitively).

Schema Registry config (URLs, basic/bearer auth, TLS, context) via
-R/--registry, -X registry.*, or a [schema_registry] config section,
defaulting to http://localhost:8081. -X / env config keys now also
accept a dot-separated form (sasl.user, registry.tls.server_name)
alongside the legacy underscore form.

'kcl fake' also serves an in-memory Schema Registry (srfake) on 8081 by
default; --seed-demo seeds avro/proto/json/plain demo topics.

Builds against the twmb/avro working tree via go.work until it is
released; franz-go pkg/sr is depended on directly.
A bare 'kcl acl list' left --type empty, which atoiResourceType maps to
UNKNOWN (0). UNKNOWN is not a valid DescribeACLs filter value -- brokers
reject the malformed filter, in the reported case by closing the
connection (read EOF on DescribeACLs). Default the list filter's --type
to 'any', a valid match-all. delete is unaffected: it requires an
explicit --type (guarding against deleting everything).
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.

list ACLs failing feature: schema registry & avro support

1 participant