fix(ci): show real current version in duplicate-deps error message - #955
Open
lucasmcdonald3 wants to merge 1 commit into
Open
fix(ci): show real current version in duplicate-deps error message#955lucasmcdonald3 wants to merge 1 commit into
lucasmcdonald3 wants to merge 1 commit into
Conversation
The duplicate aws-lc check parsed the current version from the output of grep -n, which still carries the "N:" line-number prefix, so a dep on line 18 was reported as aws-lc-sys = "18" instead of its real version. Strip the prefix before reading the version.
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.
Issue #, if available:
N/A
Description of changes:
Fixes the error message emitted by the
Check for duplicate aws-lc-sys / aws-lc-fips-sysstep inrust_duplicate_deps.yml.When a duplicate is found, the step prints a suggested diff for the offending
Cargo.toml. It parsed the "current" version from the output ofgrep -n, which still carries theN:line-number prefix, sogrep -oE '[0-9][0-9.]+' | head -1grabbed the line number instead of the version. A dependency on line 18 was reported asaws-lc-sys = "18"rather than its real version. The prefix is now stripped before reading the version, so the message shows the actual current version.Same fix as the companion PRs in aws-cryptographic-material-providers-library and aws-database-encryption-sdk-dynamodb, which share this workflow.
Squash/merge commit message, if applicable:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.