cluster: replace in-tree validator with go-config jsonschema#1290
Draft
bigbes wants to merge 1 commit into
Draft
cluster: replace in-tree validator with go-config jsonschema#1290bigbes wants to merge 1 commit into
bigbes wants to merge 1 commit into
Conversation
7b5dce2 to
82fabf7
Compare
Switch tt cluster show --validate / cluster publish from the in-tree
enumerated path validator to go-config jsonschema over the embedded
Tarantool schema.
- Add cli/cluster.Validate wrapping go-config jsonschema; drop
lib/cluster/{paths,schema,validators}.go (and tests) — ~2.9k LoC.
- Update cli/cluster/cmd/common_test.go to assert on the new
`<path> [code] <message>` substring format.
- Skip three integration tests (test_cluster_show_config_app_validate_error,
test_cluster_publish_invalid_cluster, test_cluster_publish_invalid_instance)
whose expected output depends on substituted {property}/{received}/{expected}
placeholders; awaiting tarantool/go-config#60.
- Document the behaviour change in CHANGELOG.
Part of TNTP-7390
c3ddddf to
8060291
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stacked on top of
bigbes/tntp-7389-tt-config-intial(TNTP-7389). Switchtt cluster show --validateandtt cluster publishfrom the in-tree enumerated path validator to go-config jsonschema over the embedded Tarantool schema.cli/cluster.Validatewrapping go-config jsonschema; droplib/cluster/{paths,schema,validators}.go(and tests) — ~2.9k LoC removed.cli/cluster/cmd/common_test.goto assert on the new<path> [code] <message>substring format.Known issue / temporary skips
The new go-config jsonschema validator returns error messages with unsubstituted
{property}/{received}/{expected}placeholders (root cause invalidators/jsonschema/errors.goreadingerr.Messageinstead oferr.Error()). Upstream fix: tarantool/go-config#60.Three integration tests are skipped pending a tagged go-config release with that fix:
test/integration/cluster/test_cluster_show.py::test_cluster_show_config_app_validate_errortest/integration/cluster/test_cluster_publish.py::test_cluster_publish_invalid_clustertest/integration/cluster/test_cluster_publish.py::test_cluster_publish_invalid_instancePart of TNTP-7390