Repository navigation
feat: declare unordered lists whose members are unique - #661
Merged
Merged
Conversation
The catalog now publishes `unique: true` on a list whose members must be distinct, and validation rejects a member that repeats an earlier one, reported at the later member's path and skipped for unknown values. `dokku_config`'s `preserve`, `dokku_storage_mount`'s `phases` (on the task and on each mount) and `dokku_scheduler_k3s_profile`'s `kubelet_args` are declared unique, and every unordered list is now either an identity collection or unique, so a consumer can model each one as a set. A repeated `kubelet_args` member is an exact `key=value` repeat; one key with two different values is two arguments and is still accepted.
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.
The catalog now publishes
unique: trueon a list whose members must be distinct, and validation rejects a member that repeats an earlier one, reported at the later member's path and skipped for unknown values.dokku_config'spreserve,dokku_storage_mount'sphases(on the task and on each mount) anddokku_scheduler_k3s_profile'skubelet_argsare declared unique, and every unordered list is now either an identity collection or unique, so a consumer can model each one as a set. A repeatedkubelet_argsmember is an exactkey=valuerepeat; one key with two different values is two arguments and is still accepted.Decisions: an identity collection does not carry
unique, since its item identity already makes members distinct, and a test holds every unordered list to exactly one of the two. The repeat check holds in every state, so a repeated phase on amountsitem is now refused underabsenttoo, where the old hand-written check skipped it; that check is removed in favour of the declared one.dokku_scheduler_k3s_profile'sValidate()now runs the declared constraints first like other tasks, so it refuses a repeat as Plan anddocket validatedo. The violation message names paths rather than the repeated value.Closes #648