avrolution 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +3 -0
- data/README.md +1 -1
- data/lib/avrolution/compatibility_check.rb +7 -0
- data/lib/avrolution/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c7d4b754d95d3b617fdb6530b9794c10821a160a51c82348bac6263770563b28
|
4
|
+
data.tar.gz: 5ed8aad4c8f6e1b415f87a857471f86b82737a7d7eb5c1aca8c23cdc0fd2e45d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab59c24ece897cdce51741e1957ec8fc0a9aad153af6b845f7bbb671cc77d61c8dc61159d989264034f22123ba6ecaa5399d3a61349dd3276cef5c7dc5df58a6
|
7
|
+
data.tar.gz: 58fee972a11fb77ceb5f81499585e0d705a356fc972ff69cb7403f50d34f7e4ff1c0867e61632287013ad671d7c2d6cb75ecd0a0cdf5ebafe5bcc034fa81f8f7
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -58,7 +58,7 @@ For Rails applications, the `avro:check_compatibility` task is automatically
|
|
58
58
|
defined via a Railtie.
|
59
59
|
|
60
60
|
This task does not require any arguments. It checks the
|
61
|
-
compatibility of all Avro JSON schemas found recursively under `Avrolution.root`
|
61
|
+
compatibility of all unregistered Avro JSON schemas found recursively under `Avrolution.root`
|
62
62
|
against the schema registry `ENV['COMPATIBILITY_SCHEMA_REGISTRY_URL']` or
|
63
63
|
`Avroluion.compatibility_schema_registry_url`.
|
64
64
|
|
@@ -54,6 +54,7 @@ module Avrolution
|
|
54
54
|
fingerprint = schema.sha256_resolution_fingerprint.to_s(16)
|
55
55
|
|
56
56
|
logger.info("Checking compatibility: #{fullname}")
|
57
|
+
return if schema_registered?(fullname, schema)
|
57
58
|
compatible = schema_registry.compatible?(fullname, schema, 'latest')
|
58
59
|
|
59
60
|
if compatible.nil?
|
@@ -65,6 +66,12 @@ module Avrolution
|
|
65
66
|
end
|
66
67
|
end
|
67
68
|
|
69
|
+
def schema_registered?(fullname, schema)
|
70
|
+
schema_registry.lookup_subject_schema(fullname, schema)
|
71
|
+
rescue Excon::Errors::NotFound
|
72
|
+
nil
|
73
|
+
end
|
74
|
+
|
68
75
|
# For a schema that is incompatible with the latest registered schema,
|
69
76
|
# check if there is a compatibility break defined and check compatibility
|
70
77
|
# using the level defined by the break.
|
data/lib/avrolution/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avrolution
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Salsify, Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -278,7 +278,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
278
278
|
version: '0'
|
279
279
|
requirements: []
|
280
280
|
rubyforge_project:
|
281
|
-
rubygems_version: 2.6
|
281
|
+
rubygems_version: 2.7.6
|
282
282
|
signing_key:
|
283
283
|
specification_version: 4
|
284
284
|
summary: Support for the evolution of Avro schemas stored in a schema registry.
|