CFE-4074, ENT-14368: Now supports "file" and "string-multiline" as list subtypes in module input - #339
Open
larsewi wants to merge 2 commits into
Open
CFE-4074, ENT-14368: Now supports "file" and "string-multiline" as list subtypes in module input#339larsewi wants to merge 2 commits into
larsewi wants to merge 2 commits into
Conversation
Removed "with" attibute from "file" input type and added support for collecting "file" as a subtype of "list" input. Why? Because definition in the added 062_input_file_in_list_with_keys.sh could not be expressed at all before. I.e., list of objects. Ticket: CFE-4074 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
A "list" input can now collect several blocks of text, the same way it collects strings and files. Ticket: ENT-14368 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #339 +/- ##
==========================================
+ Coverage 66.73% 67.70% +0.97%
==========================================
Files 23 24 +1
Lines 4623 4638 +15
==========================================
+ Hits 3085 3140 +55
+ Misses 1538 1498 -40
🚀 New features to boost your workflow:
|
larsewi
marked this pull request as ready for review
September 7, 2026 12:59
larsewi
requested review from
SimonThalvorsen,
aleksandrychev and
olehermanse
September 7, 2026 13:00
| % filetype, | ||
| ) | ||
| for part in filetypes: | ||
| if type(part) is not str or not part.strip() or not part.startswith("."): |
Contributor
There was a problem hiding this comment.
".txt " would pass here, and get stuck in the loop with response.endswith(filetype) check later
SimonThalvorsen
approved these changes
Sep 7, 2026
SimonThalvorsen
left a comment
Contributor
There was a problem hiding this comment.
Agree with the changes! Nice that you caught this early, makes more sense to use the list-type rather that treating the file-type as a potential list
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.
Sorry @SimonThalvorsen that I did not catch this while reviewing your PRs for CFE-4074 and ENT-14368. This is how I think it should work. When you want multiple of something, it must be in a
"list"input type. We should not re-implement"while"for each type we want multiples of. The"list"input type also allows for a series of questions to be asked per loop. And I'll need this in ENT-14365.@aleksandrychev this may break the work you've done on MP and the module you created using the "file" type.