Commit 52f2aab
authored
feat(config-migrate): couple to infra-agent agent type, simplify (#1640)
* feat: add map[string]yaml var type
* feat: extend filesystem (#1699)
* fix: use `relative_path` for file entry info
* docs: type
* feat: extend filesystem to fully support directories
* feat: a specific dir for each filesystem entity (files, dirs)
* test: templating
* test: move test-only impls to test module
* test: templating
* test: proper yaml rendering
* docs: detail how this module works
* feat: SafePath -> PathBuf
* feat(rendering): generate writable file list
* feat: rendering filesystem entry list
* style: rename path field
* test: rendering expected file entries
* test(integration): fix filesystem ops
* style: trace level logs to paths written
* refactor: migrate host agent types to filesystem
* style: use capital letters
* docs: clarify
* chore: remove unused From impl
* chore: remove leftover
* feat: merge files and directories
* refactor: make writes more safe by hiding rendering function
The function `FileSystem::rendered` was public before, which could cause access to the internal `HashMap<PathBuf, String>`. If bound as mutable, it could be modified to write to unintended locations. Now the creation of `RenderedFileSystemEntries` is safer and doesn't provide visibility to the paths, only to write.
* test: fix rendered paths comparison
* fix: correctly handle yaml templating
* feat(config-migrate): couple to infra-agent type, simplify
* style: error quoting
* wip: redefining
* feat: merge file and directory mappings
* test: fix
* docs: clarify
* style: use only the filename for map keys
* chore: remove unused code
* docs: remove misleading comment
* feat: handle env var syntax for infra configs
* docs: remove comment related to previous implementation
* style: compile Regex only once
* test: duplicate keys error
* docs: wording
* refactor: remove the possibility of duplicate mapping keys1 parent c1e5c88 commit 52f2aab
File tree
10 files changed
+718
-237
lines changed- agent-control/src
- agent_type/runtime_config/on_host
- bin
- config_migrate
- migration
- fs/src
- test/onhost-e2e/ansible
10 files changed
+718
-237
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
246 | 245 | | |
| 246 | + | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | 2 | | |
6 | 3 | | |
7 | | - | |
| 4 | + | |
8 | 5 | | |
9 | | - | |
10 | 6 | | |
11 | 7 | | |
12 | 8 | | |
13 | 9 | | |
14 | 10 | | |
15 | 11 | | |
16 | | - | |
17 | 12 | | |
18 | 13 | | |
19 | 14 | | |
20 | 15 | | |
21 | | - | |
| 16 | + | |
| 17 | + | |
22 | 18 | | |
23 | 19 | | |
24 | 20 | | |
25 | 21 | | |
26 | | - | |
| 22 | + | |
27 | 23 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 24 | + | |
31 | 25 | | |
32 | 26 | | |
33 | 27 | | |
34 | 28 | | |
35 | | - | |
| 29 | + | |
36 | 30 | | |
37 | 31 | | |
38 | 32 | | |
| |||
41 | 35 | | |
42 | 36 | | |
43 | 37 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
49 | 47 | | |
50 | 48 | | |
51 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
2 | 7 | | |
3 | | - | |
| 8 | + | |
4 | 9 | | |
5 | 10 | | |
6 | 11 | | |
7 | 12 | | |
8 | | - | |
9 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
10 | 26 | | |
11 | | - | |
| 27 | + | |
12 | 28 | | |
13 | 29 | | |
14 | 30 | | |
15 | 31 | | |
16 | | - | |
| 32 | + | |
17 | 33 | | |
18 | 34 | | |
19 | 35 | | |
20 | 36 | | |
21 | 37 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
26 | 48 | | |
27 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
28 | 66 | | |
29 | 67 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
0 commit comments