-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix image_test.snap commit hash #3
base: main
Are you sure you want to change the base?
Conversation
I was getting the following test failures: ``` $ ./scripts/run_tests.sh skipped building internal/image/fixtures/test-alpine.tar (already exists) skipped building internal/image/fixtures/test-node_modules-npm-empty.tar (already exists) skipped building internal/image/fixtures/test-node_modules-npm-full.tar (already exists) skipped building internal/image/fixtures/test-node_modules-pnpm-empty.tar (already exists) skipped building internal/image/fixtures/test-node_modules-pnpm-full.tar (already exists) skipped building internal/image/fixtures/test-node_modules-yarn-empty.tar (already exists) skipped building internal/image/fixtures/test-node_modules-yarn-full.tar (already exists) go: downloading github.com/google/go-containerregistry v0.19.1 ... ... ok github.com/google/osv-scanner/internal/customgitignore 1.526s coverage: 82.2% of statements in ./... --- FAIL: TestScanImage (0.00s) --- FAIL: TestScanImage/Alpine_3.10_image_tar_with_3.18_version_file (0.17s) image_test.go:88: - Snapshot - 1 + Received + 1 @@ -35,7 +35,7 @@ { "name": "ca-certificates-cacert", "version": "20191127-r2", - "commit": "9677580919b73ca6eff94d3d31b9a846b4e40612", + "commit": "f24637bad53762e9a2f847dd2e67bb91b1a615c2", "ecosystem": "Alpine:v3.18", "compareAs": "Alpine" }, at ../__snapshots__/image_test.snap:1205 FAIL coverage: 13.8% of statements in ./... FAIL github.com/google/osv-scanner/internal/image 4.042s ok github.com/google/osv-scanner/internal/local 1.858s coverage: 4.0% of statements in ./... ... ok github.com/google/osv-scanner/pkg/spdx 1.355s coverage: 100.0% of statements in ./... FAIL ``` I've tried reseting the fixtures dir: with, ``` $ rm internal/image/fixtures/* $ git checkout internal/image/fixtures/ ``` ... and then and restarting Docker Desktop (macos). But got the same result.
@G-Rath I've assigned this to you as the easiest way to talk about what's going on. Google has pushed changes today, so I'm guessing this isn't a "real" problem if it's not blocking CI. Options I can see causing this (decreasing likelyhood):
I've tried reseting the fixtures dir: with, |
becuase I was getting snapshot failures in TestScanImage/Alpine_3.10_image_tar_with_3.18_version_file such as: ``` @@ -35,7 +35,7 @@ { "name": "ca-certificates-cacert", "version": "20191127-r2", - "commit": "9677580919b73ca6eff94d3d31b9a846b4e40612", + "commit": "f24637bad53762e9a2f847dd2e67bb91b1a615c2", "ecosystem": "Alpine:v3.18", "compareAs": "Alpine" }, ```
I've tried pinning, and this code passes locally and fails on CI. So I'm at a lost as to what's going on. Here's my local test run after I'd deleted all my
|
@another-rex this is the only-on-Rob's-machine error I wasn running into. I've created a draft PR to record what I'd found. I've recently switched from homebrew installed go, to goenv installed go locally, but given the nature of the error I'm guessing this lives in Docker-land, rather than go-land. I agree with @G-Rath that this may well be a phantom error, and is only worth chasing if we have someone else that runs into it. It doesn't block me and I believe that google#869 will stop me triggering it. |
NOTE: the .Dockerfile pinning in this PR, has been applied in google#880 |
I was getting the following test failures:
I've tried reseting the fixtures dir: with,
... and then and restarting Docker Desktop (macos). But got the same result.