Commit 387abe0
authored
chore: Adds version scanner CI/CD upgrades (#17425)
### Summary of Changes
This PR contains updates to the automated dependency version scanner
tool and its associated CI/CD workflow to support decoupled formatting,
clean console logs, and advisory (non-signalling) runs during rollout.
#### 1. GitHub Actions (GHA) Workflow Modernization
* **Triggers & Scheduling:**
* Configured the workflow to run on `main` and any branch matching
`'**version-scanner**'`
* Set the schedule to run hourly to test how the system behaves if we
choose to use it nightly
* Added a `workflow_dispatch` button in the GHA tab to simplify ad hoc
testing and demos during development.
#### 2. Scanner Script Refactoring (Decoupled Formatters)
* Decoupled formatting code from reporting code.
* Introduced specialized formatters:
* `format_for_raw_csv`: Generates clean, unformatted raw data for CSV
reporting.
* `format_for_spreadsheet`: Wraps matches with Google Sheets formulas
(such as `HYPERLINK` and string quotes to prevent float truncation) for
Google Sheets upload.
* `format_for_console`: Prepares a slim, readable console string for
stdout/logs (especially GHA logs).
#### 3. Output Simplification
* Removed some existing outputs that no longer made sense to to
declutter GHA runner logs.
* Ensure it prints matches in the clean console format and removed some
existing duplicate outputs.
#### 4. Advisory Runs (`--soft-fail`)
* Added a `--soft-fail` CLI flag to the python script to allow it to
exit with code `0` even if version matches are found (allowing the scan
to run and report findings in the logs without failing the GHA check and
blocking merges during development and prototyping phases).
* Integrated `--soft-fail` in the GHA workflow for now to support
development.1 parent b5e0d4b commit 387abe0
4 files changed
Lines changed: 428 additions & 127 deletions
File tree
- .github/workflows
- scripts/version_scanner
- tests/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
0 commit comments