fix(binary): match istio snapshot and older pre-release versions - #5121
Open
hsdfat wants to merge 1 commit into
Open
fix(binary): match istio snapshot and older pre-release versions#5121hsdfat wants to merge 1 commit into
hsdfat wants to merge 1 commit into
Conversation
The istio pilot-agent/pilot-discovery classifiers missed every -snapshot.N build and the older -alpha.N/-beta.N/-rc.N layouts. Two defects: 1. The doubled-version matcher anchored on a bare x.y.z followed by NULs, but pre-release builds repeat the full version including the suffix (1.15.0-beta.0 NUL NUL NUL 1.15.0-beta.0), so the anchor never matched. Only the capture group had been widened previously. 2. -snapshot.N was absent from every alternation, and snapshot builds store the version only once with no leading copy, so no existing matcher could reach it. Widen the leading anchor to accept the same optional pre-release suffix it already accepts in the capture group, add -snapshot.N to each alternation, and add a matcher for the standalone snapshot layout. The new matcher is second so it can never shadow a normal build. Adds real captured snippets for pilot-agent and pilot-discovery at 1.0.0-snapshot.0, 1.5.0-alpha.0, 1.15.0-beta.0 and 1.19.0-rc.0. Fixes anchore#5060 Signed-off-by: phatlc <phatle.hsd@gmail.com>
Author
|
The Unit tests job failed as infrastructure rather than as a test — the Go compiler was killed while building aws-sdk-go-v2/service/s3 and the runner then received a shutdown signal: The run never reached any test in this PR. The same signature has hit main before (run 12976, commit ae95342). The other 7 Validations jobs are green, as are CodeQL, Validate GitHub Actions and DCO, and go test ./syft/pkg/cataloger/binary/... passes locally. Could someone re-run the failed job? |
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.
The istio pilot-agent/pilot-discovery classifiers missed every -snapshot.N build and the older -alpha.N/-beta.N/-rc.N layouts.
Two defects:
The doubled-version matcher anchored on a bare x.y.z followed by NULs, but pre-release builds repeat the full version including the suffix (1.15.0-beta.0 NUL NUL NUL 1.15.0-beta.0), so the anchor never matched. Only the capture group had been widened previously.
-snapshot.N was absent from every alternation, and snapshot builds store the version only once with no leading copy, so no existing matcher could reach it.
Widen the leading anchor to accept the same optional pre-release suffix it already accepts in the capture group, add -snapshot.N to each alternation, and add a matcher for the standalone snapshot layout. The new matcher is second so it can never shadow a normal build.
Adds real captured snippets for pilot-agent and pilot-discovery at 1.0.0-snapshot.0, 1.5.0-alpha.0, 1.15.0-beta.0 and 1.19.0-rc.0.
Fixes #5060
Description
Type of change
Checklist
Issue references