Commit 91378e7
Fix three defects found while cross-checking the documentation
**`PrepareJob.yml`: submodules were never detected.** The check tested for a
file named `.gitsubmodules`; Git's file is `.gitmodules`. `has_submodules` was
therefore always `'false'` and `git_submodule_count`, `git_submodule_names` and
`git_submodule_paths` kept their initial empty values for every repository. The
block already had the correct name in a local variable one line below, which is
now used for the test as well.
Verified against a scratch repository with two submodules:
```
has_submodules=true
count=2
names=libA:libB
paths=deps/libA:deps/libB
```
and `has_submodules=false` once the file is removed.
**`CleanupArtifacts.yml`: an unknown artifact ID raised `NameError`.** Both
compute steps call `printf(...)` in their `case _:` fallback, but the step runs
`shell: python`, where `printf` is not a function. An `artifact-json-ids` entry
that is not a key of the JSON dictionary - a typo, or a key removed from
`Parameters.yml` while a consumer still lists it - aborted the step with
`NameError: name 'printf' is not defined` instead of reporting the name. That is
precisely the case the branch exists for.
Reproduced against the previous revision (exit code 1, `NameError`) and against
this one:
```
Name 'typo_key' not found in JSON dictionary.
Artifact to delete:
pyX-UnitTestReportSummary-XML-*
pyX-Packages
```
`_Checking_CleanupArtifacts.yml` now passes an `unknown_key` entry, so the
branch is exercised by the verification pipeline.
**`CheckCodeQuality.yml`: the security scan could be skipped silently.** The
`Bandit` step was guarded by `if: inputs.artifact != ''`, although the step
writes its report to a fixed path and never used that parameter. An empty
artifact name skipped the scan while the job still reported success. The guard
is removed; the scan now runs whenever the job runs.
Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>1 parent 08dd2c2 commit 91378e7
4 files changed
Lines changed: 6 additions & 5 deletions
File tree
- .github/workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
369 | | - | |
| 369 | + | |
| 370 | + | |
370 | 371 | | |
371 | | - | |
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
0 commit comments