chore: Adds version scanner CI/CD upgrades#17425
Open
chalmerlowe wants to merge 19 commits into
Open
Conversation
Adds distinct exit codes, --stdout support, workflow file, and fixes 3.10 truncation.
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces negative lookahead patterns to prevent version truncation bugs (e.g., matching 3.10 as 3.1), adds Excel-compatible formatting for matched strings, introduces a --stdout option, and updates exit codes for CI/CD integration. Feedback from the reviewer recommends restricting the Excel-specific wrapping to numeric/version strings to avoid formula errors, using pytest.raises for cleaner test assertions, and removing unused imports and redundant file writes in the stdout logic.
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.
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
mainand any branch matching'**version-scanner**'workflow_dispatchbutton in the GHA tab to simplify ad hoc testing and demos during development.2. Scanner Script Refactoring (Decoupled Formatters)
format_for_raw_csv: Generates clean, unformatted raw data for CSV reporting.format_for_spreadsheet: Wraps matches with Google Sheets formulas (such asHYPERLINKand 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
4. Advisory Runs (
--soft-fail)--soft-failCLI flag to the python script to allow it to exit with code0even 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).--soft-failin the GHA workflow for now to support development.