Code Monkey home page Code Monkey logo

schema-registry-gitops's Introduction

schema-registry-gitops

build Docker Pulls License

Manages subjects, compatibility levels and schema registration for Confluent Schema Registry through applying a desired state file.

Overview

Schema Registry GitOps is an Infrastructure as Code tool that applies a desired state configured through simple YAML and Avro/Protobuf/JSON Schema files to a schema registry. That way you can keep a version control history of your schemas and use all your favorite tools to validate, review, merge and evolve schemas in your CI/CD pipeline.

Yaml (+Avro, Protobuf, JSON) -> CI/CD -> Schema Registry

Usage

Usage: schema-registry-gitops [-hvV] [--properties=<propertiesFilePath>]
                              [-r=<baseUrl>] [COMMAND]
Manages schema registries through Infrastructure as Code
  -h, --help                 Show this help message and exit.
      --properties=<propertiesFilePath>
                             a Java Properties file for client configuration
                               (optional)
  -r, --registry=<baseUrl>   schema registry endpoint, overwrites 'schema.
                               registry.url' from properties, can also be a
                               list of urls separated by comma
  -v, --verbose              enable verbose logging
  -V, --version              Print version information and exit.
Commands:
  apply  applies the state to the given schema registry
  dump   prints the current state
  plan   validate and plan schema changes, can be used to see all pending
           changes

In order to get help for a specific command, try schema-registry-gitops <command> -h.

Running in Docker

schema-registry-gitops is available through Docker Hub, so running it in a container is as easy as:

docker run -v "$(pwd)/examples":/data domnikl/schema-registry-gitops plan --properties /data/client.properties /data/base.yml

Please keep in mind that using a tagged release may be a good idea.

State files

The desired state is managed using the following YAML schema:

# sets global compatibility level (optional)
compatibility: FULL_TRANSITIVE
subjects:
  # a subject that links to a file for the schema definition
  - name: my-new-subject-referencing-a-schema-file
    # sets compatibility level for this subject (optional)
    compatibility: BACKWARD
    # file paths are always relative to the given (this) YAML file
    file: my-actual-schema.avsc
    # AVRO is the default type and can safely be omitted (only available for Schema Registry >= 5.5)
    type: AVRO
    # (optional) list of references for this subject
    # please note that these must be present in the registry before they can be referenced here 
    references:
      # name including the namespace, should be the same as the `type` being used in AVRO
      - name: dev.domnikl.schema-registry-gitops.User
        # subject name this schema is registered with in the registry
        subject: User-value
        # version of the referenced schema
        version: 1

  # another example: instead of referencing a file, it is also possible
  # to define the schema directly here, which is Protocol Buffers here (note explicit type here)
  - name: my-new-inline-schema-subject
    schema: 'syntax = "proto3";
        package com.acme;
        
        message OtherRecord {
          int32 an_id = 1;
        }'
    type: PROTOBUF

When using multiple files, the state is the merge result of those. Keep in mind that later references of the same subject names will overwrite earlier definitions.

compatibility

Supported compatibility values are:

  • NONE
  • FORWARD
  • BACKWARD
  • FULL
  • FORWARD_TRANSITIVE
  • BACKWARD_TRANSITIVE
  • FULL_TRANSITIVE

file, schema

Either one of file (recommended) or schema must be set. The former contains a path to a schema file while the latter can be set to a string containing the schema.

type

Supported type values are:

  • AVRO
  • PROTOBUF
  • JSON

Please note that PROTOBUF and JSON are only supported for Schema Registry >= 5.5, versions prior to that only support AVRO.

references

References to other schemas are being configured here as an optional list of references. name, subject and version need to be configured for this to work. Also note that referenced schemas need to be present in the schema registry by the time that schema-registry-gitops runs.

Configuration .properties

Configuration properties are being used to connect to the Schema Registry. The most common use case to use them instead of just supplying --registry is to use SSL. The example below uses client certificates authentication.

schema.registry.url=https://localhost:8081
security.protocol=SSL
schema.registry.ssl.truststore.location=truststore.jks
schema.registry.ssl.truststore.password=<secret>
schema.registry.ssl.keystore.location=keystore.jks
schema.registry.ssl.keystore.password=<secret>
schema.registry.ssl.key.password=<secret>

Environment variables

Env variables prefixed with SCHEMA_REGISTRY_GITOPS_ can be provided for configuration and will also be forwarded to configure the schema registry client being used. This example uses the same settings above.

SCHEMA_REGISTRY_GITOPS_SCHEMA_REGISTRY_URL=https://localhost:8081
SCHEMA_REGISTRY_GITOPS_SECURITY_PROTOCOL=SSL
SCHEMA_REGISTRY_GITOPS_SCHEMA_REGISTRY_SSL_TRUSTSTORE_LOCATION=truststore.jks
SCHEMA_REGISTRY_GITOPS_SCHEMA_REGISTRY_SSL_TRUSTSTORE_PASSWORD=<secret>
SCHEMA_REGISTRY_GITOPS_SCHEMA_REGISTRY_SSL_KEYSTORE_LOCATION=keystore.jks
SCHEMA_REGISTRY_GITOPS_SCHEMA_REGISTRY_SSL_KEYSTORE_PASSWORD=<secret>
SCHEMA_REGISTRY_GITOPS_SCHEMA_REGISTRY_SSL_KEY_PASSWORD=<secret>

Deleting subjects ⚠️

Subjects no longer listed in the State file but present in the registry will not be deleted by default. To enable full sync between the two, use either -d or --enable-deletes in plan and apply modes.

Development

Docker is used to build and test schema-registry-gitops for development.

# test & build
docker build -t domnikl/schema-registry-gitops .

# run it in Docker
docker run -v ./examples:/data domnikl/schema-registry-gitops plan --registry http://localhost:8081 /data/base.yml /data/with_references.yml

Acknowledgement

Schema Registry GitOps was born late in 2020 while being heavily inspired by Shawn Seymour and his excellent kafka-gitops! Much ❤ to Confluent for building Schema Registry and an amazing client lib, I am really just standing on the shoulders of giants here.

schema-registry-gitops's People

Contributors

domnikl avatar renovate[bot] avatar sgandon avatar smdawe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

schema-registry-gitops's Issues

Allow usage of multiple input files

We use schema-registry-gitops in our build pipeline to manage the schema registry.
The tool currently only supports the use of one input file, which becomes confusing and long with a larger number of subjects/schemas.

Would it be possible to extend the functionality so that multiple input files could be used? For example, to allow separation by domains

Limit scope of deletions

Congrats on a simple and powerful tool!

My plan for schema-registry-gitops is to have each of our microservices run it as part of their CI/CD run. Each service owns a subset of the entire subject set in the schema registry. SRG already naturally appears to scope its operations to the list of subjects present in the input yaml. This means I can already pretty easily limit the operations any given CI/CD run can apply to a service's own subjects. The issue I have is with the "--enable-deletes" flag. Without that flag, my plans and applies do the right thing. However, I would like to support deleting subjects through my CI/CD runs as well. If I add that to a single service's run of SRG, it's going to want to delete all the subjects that aren't in its own list.

In order to support this usage pattern, we could add a flag deleted: to the state file instead of using a globally-applied --enable-deletes flag. This would give users find-grained control over deletions, but at the cost of a backwards-incompatible change. Another way to do it would be to add a flag that lets users scope all operations to a subset of subjects. Something like --scope=subject1,subject2,subject3 or by prefix --scope-prefix=subject_prefix Thoughts? I am happy to submit a PR.

Support for clustered setup

If using schema registry in the cluster (for HA), only one of the nodes is leading and can write to internal schema registry topic. That's why CachedSchemaRegistryClient accepts both the single string as baseUrl (which is then split by comma) or list directly.

Please can you support defining this list in schema.registry.url property?

I guess that change is needed only in Factory.kt and can be done backward compatible.

Schema is not updated when "doc" attribute changed

I have changed some "doc" attributes in my avro schema, but the tool doesn't update them in schema registry.

At first it looks like no problem, but when applications are trying get schemaid from registry (POST /subjects/{subject}), the registry returns 403 Schema not found (even with normalize=true parameter)

In documentation, they wrote that

Schema Registry will use the string representation of the schema for registration/lookup

I think that tool should use same method for schema comparison as registry do.

Schema Compatibility validation is not applied

I have been testing the tool, but it seems that it is not validating the schema compatibility correctly, e.g. if I change the name of a schema field with the compatibility level set to backward it allows me to apply the change:

2022-12-28 14:57:10.672 INFO    ~ schema   {
    "schema" : {
      "properties" : {
        "id" : {
          "type" : "string"
        },
-       "message" : {
+       "messagex" : {
          "type" : "string"
        }
      },
      "required" : [ "message" ],
      "type" : "object",
      "title" : "foo-event"
    },
    "schemaType" : "JSON"
  }
2022-12-28 14:57:10.672 INFO
2022-12-28 14:57:10.672 INFO [SUCCESS] All changes are compatible and can be applied.

I tried using it with the docker image and compiling locally from the master branch and got the same results no schema validation at all.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
docker-compose.yml
  • confluentinc/cp-kafka 7.7.0
  • confluentinc/cp-schema-registry 7.7.0
dockerfile
Dockerfile
  • amazoncorretto 17.0.12-alpine
  • amazoncorretto 17.0.12-alpine
github-actions
.github/workflows/main.yml
  • actions/checkout v4
.github/workflows/release.yml
  • actions/checkout v4
  • docker/login-action 9780b0c442fbb1117ed29e0efdff1e18412f7567
  • docker/metadata-action 60a0d343a0d8a18aedee9d34e62251f752153bdb
  • docker/build-push-action 16ebe778df0e7752d2cfcbd924afdbbd89c1a755
gradle
gradle.properties
settings.gradle.kts
build.gradle.kts
  • org.jetbrains.kotlin.jvm 1.9.25
  • org.jetbrains.kotlin.plugin.spring 1.9.25
  • com.github.johnrengelman.shadow 8.1.1
  • org.jlleitschuh.gradle.ktlint 12.1.1
  • org.jetbrains.gradle.plugin.idea-ext 1.1.8
  • info.picocli:picocli 4.7.6
  • org.slf4j:slf4j-api 2.0.15
  • ch.qos.logback:logback-classic 1.5.6
  • ch.qos.logback:logback-core 1.5.6
  • com.fasterxml.jackson.dataformat:jackson-dataformat-yaml 2.17.2
  • com.fasterxml.jackson.core:jackson-databind 2.17.2
  • com.fasterxml.jackson.module:jackson-module-kotlin 2.17.2
  • com.google.code.gson:gson 2.11.0
  • org.apache.commons:commons-compress 1.27.0
  • io.confluent:kafka-schema-registry-client 7.7.0
  • io.confluent:kafka-protobuf-serializer 7.7.0
  • io.confluent:kafka-json-schema-serializer 7.7.0
  • com.github.everit-org.json-schema:org.everit.json.schema 1.14.4
  • io.github.java-diff-utils:java-diff-utils 4.12
  • org.junit:junit-bom 5.10.3
  • io.mockk:mockk 1.13.12
  • com.github.stefanbirkner:system-rules 1.19.0
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.9

  • Check this box to trigger a request for Renovate to run again on this repository

Schema deletion + plan functionality

Hello,

Thanks for this nice tool ! In your README you speak about the kafka-gitops analogy.

I see two differences mainly:

  • there is no real "plan" functionality. Does the validate CLI option query the schema-registry to see if there is an update to do or not ?
  • I played a bit and I see that if I remove a schema from the configuration, this later is not deleted from the schema registry: Is it intentional ? I personally prefer to have it removed but of course, I would need to be able to see it in a "plan" before

Best,
Jerome

add download subcommand

It should download a subjects last schema version from the registry like this:

schema-registry-gitops download --registry http://localhost:8081 User-value -o User.avsc

CLI switches:

  • -o path to output file, will be replaced if it exists, default is stdout
  • --registry like other subcommands

Error trying to use docker run command in README

> docker run -v "$(pwd)/examples":/data domnikl/schema-registry-gitops plan --properties /data/client.properties /data/schema-registry.yml

2022-08-09 19:36:27.563 INFO Starting MainKt using Java 17-ea on 4263ce7d318d with PID 1 (/home/cuser/schema-registry-gitops.jar started by root in /home/cuser)
2022-08-09 19:36:27.574 INFO No active profile set, falling back to 1 default profile: "default"
2022-08-09 19:36:30.668 INFO Started MainKt in 3.605 seconds (JVM running for 4.408)
2022-08-09 19:36:30.947 WARN Unable to get bean of class class dev.domnikl.schema_registry_gitops.cli.Plan, using default Picocli factory
picocli.CommandLine$InitializationException: Cannot instantiate dev.domnikl.schema_registry_gitops.cli.Plan: the class has no constructor
	at picocli.CommandLine$DefaultFactory.create(CommandLine.java:5543)
	at picocli.CommandLine$Model$CommandUserObject.getInstance(CommandLine.java:11918)
	at picocli.CommandLine$Model$CommandSpec.userObject(CommandLine.java:6285)
	at picocli.CommandLine$Interpreter.clear(CommandLine.java:13111)
	at picocli.CommandLine$Interpreter.parse(CommandLine.java:13156)
	at picocli.CommandLine$Interpreter.processSubcommand(CommandLine.java:13468)
	at picocli.CommandLine$Interpreter.processArguments(CommandLine.java:13374)
	at picocli.CommandLine$Interpreter.parse(CommandLine.java:13177)
	at picocli.CommandLine$Interpreter.parse(CommandLine.java:13146)
	at picocli.CommandLine$Interpreter.parse(CommandLine.java:13047)
	at picocli.CommandLine.parseArgs(CommandLine.java:1478)
	at picocli.CommandLine.execute(CommandLine.java:2077)
	at dev.domnikl.schema_registry_gitops.SchemaRegistryGitopsApplication.run(Main.kt:33)
	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:771)
	at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:755)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
	at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:164)
	at dev.domnikl.schema_registry_gitops.MainKt.main(Main.kt:61)
Caused by: java.lang.NoSuchMethodException: dev.domnikl.schema_registry_gitops.cli.Plan.<init>()
	at java.base/java.lang.Class.getConstructor0(Class.java:3530)
	at java.base/java.lang.Class.getDeclaredConstructor(Class.java:2700)
	at picocli.CommandLine$DefaultFactory.create(CommandLine.java:5514)
	at picocli.spring.PicocliSpringFactory.create(PicocliSpringFactory.java:26)
	at picocli.CommandLine$DefaultFactory.create(CommandLine.java:5541)

Any suggestion on what im doing wrong?

Environment Variable Support for Docker

Hi there!

This is a fantastic project! Just a small question whether or not the docker version of the tool supports passing in the configuration properties as environment variables?
Thanks

Incompatibilities between confluent schema registry and karapace

There is a confluent schema registry counterpart karapace. schema-registry-gitops is able to deploy schemas to karapace

docker run --network host -e SCHEMA_REGISTRY_GITOPS_SCHEMA_REGISTRY_URL=http://localhost:8081 -e SCHEMA_REGISTRY_GITOPS_SCHEMA_REGISTRY_BASIC_AUTH_CREDENTIALS_SOURCE=USER_INFO -e SCHEMA_REGISTRY_GITOPS_SCHEMA_REGISTRY_BASIC_AUTH_USER_INFO=admin:secret -v "$(pwd)/contracts":/data domnikl/schema-registry-gitops apply /data/schema-registry.yml -v
2022-06-28 11:11:23.178 DEBUG Loading state file /data/schema-registry.yml, referenced schemas from /data
2022-06-28 11:11:23.344 DEBUG Sending GET with input null to http://localhost:8081/subjects
2022-06-28 11:11:23.425 DEBUG Sending POST with input {"schema":"{\"type\":\"record\",\"name\":\"test_schema\",\"fields\":[{\"name\":\"field1\",\"type\":[\"null\",\"string\"]}]}"} to http://localhost:8081/compatibility/subjects/test_schema/versions/latest
2022-06-28 11:11:23.434 DEBUG Sending GET with input null to http://localhost:8081/config/
2022-06-28 11:11:23.445 DEBUG Sending POST with input {"schema":"{\"type\":\"record\",\"name\":\"test_schema\",\"fields\":[{\"name\":\"field1\",\"type\":[\"null\",\"string\"]}]}"} to http://localhost:8081/subjects/test_schema/versions
2022-06-28 11:11:23.622 INFO [SUBJECT] test_schema
2022-06-28 11:11:23.625 INFO    + registered (version 2)
2022-06-28 11:11:23.626 DEBUG Sending PUT with input {"compatibility":"BACKWARD"} to http://localhost:8081/config/test_schema
2022-06-28 11:11:23.643 INFO    + compatibility BACKWARD
2022-06-28 11:11:23.643 INFO 
2022-06-28 11:11:23.643 INFO [SUCCESS] Applied state from /data/schema-registry.yml to http://localhost:8081

but on second run it fails

docker run --network host -e SCHEMA_REGISTRY_GITOPS_SCHEMA_REGISTRY_URL=http://localhost:8081 -e SCHEMA_REGISTRY_GITOPS_SCHEMA_REGISTRY_BASIC_AUTH_CREDENTIALS_SOURCE=USER_INFO -e SCHEMA_REGISTRY_GITOPS_SCHEMA_REGISTRY_BASIC_AUTH_USER_INFO=admin:secret -v "$(pwd)/contracts":/data domnikl/schema-registry-gitops apply /data/schema-registry.yml -v
2022-06-28 11:11:26.176 DEBUG Loading state file /data/schema-registry.yml, referenced schemas from /data
2022-06-28 11:11:26.342 DEBUG Sending GET with input null to http://localhost:8081/subjects
2022-06-28 11:11:26.427 DEBUG Sending POST with input {"schema":"{\"type\":\"record\",\"name\":\"test_schema\",\"fields\":[{\"name\":\"field1\",\"type\":[\"null\",\"string\"]}]}"} to http://localhost:8081/compatibility/subjects/test_schema/versions/latest
2022-06-28 11:11:26.434 DEBUG Sending GET with input null to http://localhost:8081/config/
2022-06-28 11:11:26.446 DEBUG Sending GET with input null to http://localhost:8081/config/test_schema
2022-06-28 11:11:26.455 DEBUG Sending GET with input null to http://localhost:8081/subjects/test_schema/versions/latest
2022-06-28 11:11:26.473 ERROR com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "compatibility" (class io.confluent.kafka.schemaregistry.client.rest.entities.Schema), not marked as ignorable (6 known properties: "schema", "version", "id", "subject", "references", "schemaType"])
 at [Source: (sun.net.www.protocol.http.HttpURLConnection$HttpInputStream); line: 1, column: 214] (through reference chain: io.confluent.kafka.schemaregistry.client.rest.entities.Schema["compatibility"])

Plans for a new release?

Hi there, my team is using is using your image to manage our schemas, and we've had several vulnerabilities get flagged for the current version (1.9.0). I saw there was a recent PR to address most if not all of those. Are there any plans to release this to a new image version?

Thanks for your work on this tool!

Using client.properties doesn't work with the latest version

Hello,
If I use latest version of schema-registry-gitops docker image with client.properties file for example

docker run --network host -v "$(pwd)/client.properties":/cfg/client.properties -v "$(pwd)/contracts":/data domnikl/schema-registry-gitops --properties /cfg/client.properties plan /data/schema-registry.yml

It fails with an exception

picocli.CommandLine$InitializationException: Could not instantiate class dev.domnikl.schema_registry_gitops.cli.Apply: java.lang.reflect.InvocationTargetException
        at picocli.CommandLine$DefaultFactory.create(CommandLine.java:5538)
        at picocli.CommandLine$Model$CommandUserObject.getInstance(CommandLine.java:11863)
        at picocli.CommandLine$Model$CommandSpec.userObject(CommandLine.java:6278)
        at picocli.CommandLine$Interpreter.clear(CommandLine.java:13056)
        at picocli.CommandLine$Interpreter.parse(CommandLine.java:13101)
        at picocli.CommandLine$Interpreter.processSubcommand(CommandLine.java:13395)
        at picocli.CommandLine$Interpreter.processArguments(CommandLine.java:13310)
        at picocli.CommandLine$Interpreter.parse(CommandLine.java:13122)
        at picocli.CommandLine$Interpreter.parse(CommandLine.java:13091)
        at picocli.CommandLine$Interpreter.parse(CommandLine.java:12992)
        at picocli.CommandLine.parseArgs(CommandLine.java:1478)
        at picocli.CommandLine.execute(CommandLine.java:2077)
        at dev.domnikl.schema_registry_gitops.MainKt.main(Main.kt:26)
Caused by: java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:78)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
        at picocli.CommandLine$DefaultFactory.create(CommandLine.java:5513)
        at picocli.CommandLine$DefaultFactory.create(CommandLine.java:5534)

But this seems to work if I use 1.3.0 version

docker run --network host -v "$(pwd)/client.properties":/cfg/client.properties -v "$(pwd)/contracts":/data domnikl/schema-registry-gitops:1.3.0 --properties /cfg/client.properties plan /data/schema-registry.yml

4 critical CVEs in the latest 1.0.9 published image.

docker-scout quickview domnikl/schema-registry-gitops:1.9.0
    ✓ Image stored for indexing
    ✓ Indexed 78 packages

  Target     │  domnikl/schema-registry-gitops:1.9.0  │    4C    22H     8M     1L     1?
    digest   │  e338e3783f76                          │
  Base image │  openjdk:17-alpine                     │    4C    16H     7M     0L     1?

Does this allow for schema evolution

Question is possible to do schema evolution with this tool:

compatibility: BACKWARD

subjects:
  
  - name: sample-value
    file: sample1.avsc
    compatibility: BACKWARD

  - name: sample-value
    file: sample1_v2.avsc
    compatibility: BACKWARD

If curl the schema registry I would get the following:

curl http://localhost:8081/subjects/sample-value/versions
[1,2]

Relative path for YAML file may throws NPE

If a relative path without directory component is provided to the CLI, an NPE will be thrown upon trying to access the parent directory. Paths should be resolved to absolute ones in order to reliably get their parent directory.

Possible to use tool for validating multiple schema for given subject?

Is it possible to validate a schema file containing an array of valid schema against the current state of the registry? It appears that the only communication with the confluent schema registry client occurs in SchemaRegistryClient.getLatestSchema, meaning that the diff considers a single version of the requested schema against an array.

Automatically setting new version when updating dependencies

Hi, thanks for your work on this tool! It's great.

I wanted to check if there's a way to automatically set the version of a reference to latest? For example, let's say I have schemas A and B where A depends on B and I've made a change in B that I want to upload. It seems like I need to do this in two steps:

  1. apply the change to B, so that it has a new version number
  2. make a new change where I bump the reference version number that A has on B

instead, it would be nice if apply would automatically upload the new B schema and then update A to point to the latest B in one go. Is that currently possible?

I've tried setting the version to latest, which seems like it should be possible based on this error when I leave it blank:

2024-01-18 11:18:46.005 ERROR Could not parse Protobuf schema
java.lang.RuntimeException: io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException: The specified version '0' is not a valid version id. Allowed values are between [1, 2^31-1] and the string "latest"; error code: 42202

but then I get a different error:

2024-01-18 11:19:07.440 ERROR com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `int` from String "latest": not a valid `int` value

How to provide authentication information for schema registry?

I have tried to use docker run -e SCHEMA_REGISTRY_GITOPS_SCHEMA_REGISTRY_URL=http://user:password@localhost:8085 .... but it returns Unauthorized exception

ERROR io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException: 
Unauthorized; error code: 401

Should it be provided somehow differently or may be special options should be used?

Question: Register multiple messages in protobuf file

It seems to me that if there are multiple messages defined (cases of both dependent and independent messages) in one single protobuf file, wonly the first one will/can be registered. Is this correct? If so, is there any one in this tool that can help register all schemas? @domnikl

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.