CFE-4708: Added support for a path-variable in def.json to specify files to ship beyond just extension-matching - #336
Conversation
8ea72b6 to
0b141b0
Compare
0b141b0 to
73b086d
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #336 +/- ##
==========================================
+ Coverage 66.73% 67.15% +0.42%
==========================================
Files 23 23
Lines 4623 4634 +11
==========================================
+ Hits 3085 3112 +27
+ Misses 1538 1522 -16
🚀 New features to boost your workflow:
|
73b086d to
19330c5
Compare
d1f33df to
fcb86db
Compare
…les to ship beyond just extension-matching Ticket: CFE-4708 Changelog: Added support for input-files-paths to be placed `input_paths_extra` to allow specified files to ship independent of what is specified in `input_name_patterns[_extra]` Signed-off-by: Simon Halvorsen <simon.halvorsen@northern.tech>
fcb86db to
17e1595
Compare
| # relative path. | ||
| relative_paths = [path.replace(os.sep, "/") for path in localized_paths] | ||
| extras = merge_json( | ||
| extras, {"vars": {"default:update_def.input_paths_extra": relative_paths}} |
There was a problem hiding this comment.
should there be some validation that the masterfiles version that is part of the current project supports this facility?
There was a problem hiding this comment.
Probably, would work fine for "normal" files on any version, but it does not have a check for that, so this step should have a guard. Can add tomorrow, out of office for the day
There was a problem hiding this comment.
But it will only work when masterfiles carries that patch we made. So if this feature is being used and the masterfiles module is not version 3.29.0 or greater it would fail. We can backport the change in masterfiles but still then they woul dhave to be using masterfiles 3.27.2 or greater in the 3.27 seiries, 3.24.5 or greater in the 3.24 series or 3.29.0 or greater
|
|
||
|
|
||
| def test_localize_file_inputs_rejects_path_traversal(tmp_path, monkeypatch): | ||
| """An absolute (or '..'-laden) response would otherwise let os.path.join |
There was a problem hiding this comment.
Lade, that verb is new to me
Ticket: CFE-4708
Changelog: Added support for input-files-paths to be placed
input_paths_extrato allow specified files to ship independent of what is specified ininput_name_patterns[_extra]