CFE-4574: Added yaml-promise-type - #166
Merged
Merged
Conversation
olehermanse
requested review from
craigcomstock,
larsewi,
nickanderson and
victormlg
September 25, 2026 14:37
nickanderson
approved these changes
Sep 25, 2026
olehermanse
reviewed
Sep 25, 2026
Comment on lines
+73
to
+77
| "$(g.file)" | ||
| filter => ".server.tls.cert", | ||
| operation => "set", | ||
| value => "/etc/ssl/app.pem", | ||
| classes => outcome("$(pass)"); |
Member
There was a problem hiding this comment.
I agree with Nick that operation feels a bit off. Not mainly because it's imperative, but it seems unnecessary to have a separate attribute for it, i.e. we can do:
Suggested change
| "$(g.file)" | |
| filter => ".server.tls.cert", | |
| operation => "set", | |
| value => "/etc/ssl/app.pem", | |
| classes => outcome("$(pass)"); | |
| "$(g.file)" | |
| target => ".server.tls.cert", | |
| is => "/etc/ssl/app.pem", | |
| classes => outcome("$(pass)"); |
I think target ... is ... sounds more clear than filter ... operation set value ...
Contributor
Author
There was a problem hiding this comment.
Agree target ... is ... reads more nicely for the set-operation, but weird for something like .ports[] is "22:22".
Nicks I think reads better, just rename operation to state, then we could do
target => ".server.port", state => "present", value => "8080"; # key has value
target => ".server.ports[]", state => "present", value => "22:22"; # list contains
target => ".server.debug", state => "absent"; # key removed
by merging set and present and deciding based on the target containing brackets
craigcomstock
left a comment
Contributor
There was a problem hiding this comment.
this is what I came up with so far. Will look more carefully another time soon.
SimonThalvorsen
force-pushed
the
master
branch
from
September 25, 2026 21:56
d8942b2 to
0c61534
Compare
larsewi
reviewed
Sep 28, 2026
SimonThalvorsen
force-pushed
the
master
branch
from
September 28, 2026 12:01
0c61534 to
a75a430
Compare
larsewi
reviewed
Sep 28, 2026
Ticket: CFE-4574 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Simon Halvorsen <simon.halvorsen@northern.tech>
SimonThalvorsen
force-pushed
the
master
branch
from
September 28, 2026 14:46
a75a430 to
8d42b43
Compare
craigcomstock
approved these changes
Sep 28, 2026
larsewi
approved these changes
Sep 29, 2026
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.
Ticket: CFE-4574