Repository navigation
feat: label every preset, and lint presets in a check of their own - #52
Merged
Merged
Conversation
Every preset now carries a label, including those whose name capitalizes correctly, so the name lerd shows a service under is always stated in its definition rather than guessed from the lowercase name. The schema guard refuses a preset or an index entry without one, and the README lists label as a required field.
The schema guard answers one question, whether an older lerd can still read the store, and a red guard has to keep meaning exactly that. A missing label is something to add rather than a change that breaks an install, so the check moves to preset_lint.py with its own job and test, and the guard is back as it was.
…dex drift Each of these went wrong in a preset this week or is a rule the README already states without anything holding it: a file not named after its preset, a colour that is dropped, a .test domain that breaks other TLDs and installs without the domain, a data-keeping preset floating on latest, and an index entry that no longer says what its preset says. The whole store passes all of them today.
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.
Follow-up to #50, which was merged before its last commit reached it. #50 labelled the presets whose lowercase name capitalizes wrong; this labels the rest too (Adminer, Kafka, Mongo Express, SpamAssassin, Umami, Valkey and the others), so the name lerd shows a service under is always stated in its definition rather than guessed.
Requiring the label lives in a new preset lint,
.github/scripts/preset_lint.py, run as its own preset-lint job with its own test, rather than in the schema guard. The guard keeps answering one question, whether an older lerd can still read the store, so a red guard always means exactly that, and the lint answers whether a definition is complete.Beside the label, the lint refuses a preset file not named after its
name, acolorthat is not a plain hex literal, a.testdomain written intoenv_varsordashboard, a preset with adata_dirwhose image floats on latest, and anindex.jsonentry that no longer says what its preset says. Each of those either went wrong in a preset this week or is a rule the README states without anything holding it, and the whole store passes all of them today. The README names them.A lerd without lerd-env/lerd#2301 ignores
label, so publishing this changes nothing on older installs.