8 releases

0.1.8 Apr 26, 2023
0.1.7 Aug 9, 2022
0.1.6 Dec 1, 2021
0.1.5 Nov 26, 2021
0.1.0 Oct 31, 2021

#362 in Development tools

Download history 32/week @ 2024-02-19 7/week @ 2024-02-26 87/week @ 2024-04-01

87 downloads per month

Apache-2.0/MIT

135KB
684 lines

Degauss

DeGauss

Your friendly neighborhood Avro schema compatibility checker.


cicd Crates.io Docs.rs codecov


Install

Grab a binary from releases

Using cargo

cargo install degauss

Example

  • Check the compatibility of your schemas

    $ degauss validate -s tests/data/movies-raw-reader.avsc tests/data/movies-raw-writer.avsc -c full-transitive
    
  • Check the compatibility and set the exit status in case of a failure.

    $ degauss validate -s tests/data/movies-raw-reader.avsc tests/data/movies-raw-writer.avsc -c full-transitive --exit-status
    
  • Register a schema to schema-registry

    • create a file with env variables
    $ cat env
    export DEGAUSS_SCHEMA_REGISTRY_URL=https://some-url
    export DEGAUSS_SCHEMA_REGISTRY_USER=some-user
    export DEGAUSS_SCHEMA_REGISTRY_PASS=some-pass
    
    $ source env
    
    $ degauss schema-registry register --subject-type value --topic test2 --schema-path ./tests/data/movies-raw-reader.avsc
    
  • Get the compatibility for a subject:

    $ degauss schema-registry compatibility get --subject-type value --topic test
    
  • Set the compatibility for a subject:

    $ degauss schema-registry compatibility set --subject-type value --topic test --compatibility forward
    

Development

Apart from integration tests, to run compatibility tests please use:

cargo test _compat

Dependencies

~25–38MB
~619K SLoC