Skip to content
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

exporter: make OnBuild omiteempty #4648

Merged
merged 1 commit into from
Feb 16, 2024
Merged

Conversation

thaJeztah
Copy link
Member

@thaJeztah
Copy link
Member Author

Looks like something's broken in CI (I saw a discussion about this, not sure what the outcome was though)

#5 DONE 0.3s
Dockerfile:1
--------------------
   1 | >>> # syntax=docker/dockerfile-upstream:master
   2 |     
   3 |     ARG RUNC_VERSION=v1.1.12
--------------------
ERROR: failed to solve: failed to resolve source metadata for docker.io/docker/buildkit-syft-scanner:stable-1: fallback not implemented
make: *** [Makefile:35: release] Error 1
Error: Process completed with exit code 2.

@thaJeztah
Copy link
Member Author

@thaJeztah
Copy link
Member Author

@AkihiroSuda not sure yet if we want to merge this one; this was mostly for testing if we see the same failures (differences in digests in multiple places?) as the other PR, or if there's other changes that caused them 😅

Aligning with the docker image spec;
https://github.com/moby/docker-image-spec/blob/f1d00ebd2d6d6805170d5543dbca4b850f35f9af/specs-go/v1/image.go#L30C19-L30C100

Also adjust the digest in tests, as changing this field results
in the digest to change:

    === FAIL: frontend/dockerfile TestIntegration/TestReproSourceDateEpoch/worker=containerd-1.6/frontend=gateway (11.70s)
        dockerfile_test.go:6853: SOURCE_DATE_EPOCH=1673354096
        dockerfile_test.go:6917: The digest may change depending on the BuildKit version, the snapshotter configuration, etc.
        dockerfile_test.go:6918:
                Error Trace:	/src/frontend/dockerfile/dockerfile_test.go:6918
                                            /src/util/testutil/integration/run.go:93
                                            /src/util/testutil/integration/run.go:207
                Error:      	Not equal:
                                expected: "sha256:29f2980a804038b0f910af98e9ddb18bfa4d5514995ee6bb4343ddf621a4e183"
                                actual  : "sha256:3eb3c164e3420bbfcf52c34f1e40ee66631d69445e934175b779551c729f80df"

                                Diff:
                                --- Expected
                                +++ Actual
                                @@ -1 +1 @@
                                -sha256:29f2980a804038b0f910af98e9ddb18bfa4d5514995ee6bb4343ddf621a4e183
                                +sha256:3eb3c164e3420bbfcf52c34f1e40ee66631d69445e934175b779551c729f80df
                Test:       	TestIntegration/TestReproSourceDateEpoch/worker=containerd-1.6/frontend=gateway

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
Copy link
Member Author

It looks like CI is green with this change (and adjusting the digest accordingly), so we'd have to look in the other changes in #4634 (comment) to see that's causing the digest of the layers to change 🤔

I squashed the commits in this PR, and maybe we should indeed consider merging this one, and look at #4634 as a follow-up to this. I'll stack that other PR on top of this one, which should also re-run CI on it (perhaps ti was some flakiness?)

@thaJeztah thaJeztah marked this pull request as ready for review February 15, 2024 13:30
@tonistiigi tonistiigi merged commit fdd2b2e into moby:master Feb 16, 2024
65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants