Skip to content

cluster: replace in-tree validator with go-config jsonschema#1290

Draft
bigbes wants to merge 1 commit into
bigbes/tntp-7389-tt-config-intialfrom
bigbes/tntp-7390-tt-config-p2
Draft

cluster: replace in-tree validator with go-config jsonschema#1290
bigbes wants to merge 1 commit into
bigbes/tntp-7389-tt-config-intialfrom
bigbes/tntp-7390-tt-config-p2

Conversation

@bigbes
Copy link
Copy Markdown
Collaborator

@bigbes bigbes commented May 6, 2026

Summary

Stacked on top of bigbes/tntp-7389-tt-config-intial (TNTP-7389). Switch tt cluster show --validate and tt 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 removed.
  • Update cli/cluster/cmd/common_test.go to assert on the new <path> [code] <message> substring format.
  • Document the behaviour change in CHANGELOG (stricter validator, new error message format).

Known issue / temporary skips

The new go-config jsonschema validator returns error messages with unsubstituted {property} / {received} / {expected} placeholders (root cause in validators/jsonschema/errors.go reading err.Message instead of err.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_error
  • test/integration/cluster/test_cluster_publish.py::test_cluster_publish_invalid_cluster
  • test/integration/cluster/test_cluster_publish.py::test_cluster_publish_invalid_instance

Part of TNTP-7390

@bigbes bigbes requested review from patapenka-alexey and sssciel May 6, 2026 14:32
@bigbes bigbes force-pushed the bigbes/tntp-7389-tt-config-intial branch from 7b5dce2 to 82fabf7 Compare May 6, 2026 16:03
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
@bigbes bigbes force-pushed the bigbes/tntp-7390-tt-config-p2 branch from c3ddddf to 8060291 Compare May 6, 2026 16:05
@bigbes bigbes added the forbid-merge should not allow merging label May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

forbid-merge should not allow merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant