refactor: declare the property task fields once - #468
Merged
josegonzalez merged 1 commit intoAug 12, 2026
Merged
josegonzalez merged 1 commit into
josegonzalez merged 1 commit into
Conversation
The twenty-seven property tasks each restated the same `app`, `global`, `property`, `value`, `state` field set, so every cross-cutting change had to be applied twenty-seven times by hand. They now name a defined type over the shared `PropertyFields`, or over `SensitivePropertyFields` for a plugin whose values can be credentials. A defined type rather than an embedded struct keeps the field set flat to reflection, so the catalog, the required-field walk behind `missing_required_field`, the identity walk that names an unnamed task and the sensitive-value walks read the fields exactly as before. The parameter descriptions become plugin-agnostic as a result, which is what regenerates the task pages; the page title, synopsis and Properties table already name the plugin. Fixes #454.
josegonzalez
deleted the
454-extract-a-shared-propertyfields-struct-across-the-property-tasks
branch
August 12, 2026 20:41
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 twenty-seven property tasks each restated the same
app,global,property,value,statefield set, so every cross-cutting change had to be applied twenty-seven times by hand. They now name a defined type over the sharedPropertyFields, or overSensitivePropertyFieldsfor a plugin whose values can be credentials. A defined type rather than an embedded struct keeps the field set flat to reflection, so the catalog, the required-field walk behindmissing_required_field, the identity walk that names an unnamed task and the sensitive-value walks read the fields exactly as before. The parameter descriptions become plugin-agnostic as a result, which is what regenerates the task pages; the page title, synopsis and Properties table already name the plugin. Fixes #454.dokku_scheduler_docker_local_propertyanddokku_service_propertyaddress their resources differently and keep their own fields, listed with the reason inpropertyTasksWithOwnFields.TestPropertyTasksDeclareTheSharedFieldsfails the build for any other*_propertytask that restates the shared set, comparing struct tags rather than usingConvertibleTo, which ignores exactly the difference that matters.TestSensitivePropertyFieldsMatchesPropertyFieldskeeps the two shared types from drifting apart in anything but thesensitivetag onvalue.The three toggle tasks carry the same duplication at smaller scale; that is #467 rather than part of this change.