Skip to content

Flaky test: TestBuildPolicyDenyProgressStream #3826

@crazy-max

Description

@crazy-max

https://github.com/docker/buildx/actions/runs/25313159791/job/74204550777?pr=3825

=== Failed
=== FAIL: tests TestIntegration/TestBuildPolicyDenyProgressStream/worker=remote (4.80s)
    policy_build.go:186: 
        	Error Trace:	/src/tests/policy_build.go:186
        	            				/src/vendor/github.com/moby/buildkit/util/testutil/integration/run.go:105
        	            				/src/vendor/github.com/moby/buildkit/util/testutil/integration/run.go:253
        	Error:      	"" does not contain "not allowed by policy"
        	Test:       	TestIntegration/TestBuildPolicyDenyProgressStream/worker=remote
        	Messages:   	{"vertexes":[{"digest":"sha256:0dbd2b21ddaf036d6ee8e1135b5e7285130ce6956d989828882d35da41d8c7b2","name":"loading policies /tmp/TestIntegrationTestBuildPolicyDenyProgressStreamworker=remote844644086/001/policy.rego","started":"2026-05-04T10:13:16.390847815Z"}]}
        	            	{"logs":[{"vertex":"sha256:0dbd2b21ddaf036d6ee8e1135b5e7285130ce6956d989828882d35da41d8c7b2","stream":1,"data":"Y2hlY2tpbmcgcG9saWN5IGZvciBzb3VyY2UgbG9jYWw6Ly9kb2NrZXJmaWxlCg==","timestamp":"2026-05-04T10:13:16.39085074Z"}]}
        	            	{"logs":[{"vertex":"sha256:0dbd2b21ddaf036d6ee8e1135b5e7285130ce6956d989828882d35da41d8c7b2","stream":1,"data":"cG9saWN5IGRlY2lzaW9uIGZvciBzb3VyY2UgbG9jYWw6Ly9kb2NrZXJmaWxlOiBBTExPVwo=","timestamp":"2026-05-04T10:13:16.393308298Z"}]}
        	            	{"vertexes":[{"digest":"sha256:eb41b01ac64682c04903fb8875ecac0c8c66e502d7d06926911e213505ac4afe","name":"[internal] load build definition from Dockerfile"}]}
        	            	{"vertexes":[{"digest":"sha256:eb41b01ac64682c04903fb8875ecac0c8c66e502d7d06926911e213505ac4afe","name":"[internal] load build definition from Dockerfile","started":"2026-05-04T10:13:16.387922202Z"}]}
        	            	{"vertexes":[{"digest":"sha256:eb41b01ac64682c04903fb8875ecac0c8c66e502d7d06926911e213505ac4afe","name":"[internal] load build definition from Dockerfile","started":"2026-05-04T10:13:16.387922202Z","completed":"2026-05-04T10:13:16.387973643Z"}]}
        	            	{"vertexes":[{"digest":"sha256:eb41b01ac64682c04903fb8875ecac0c8c66e502d7d06926911e213505ac4afe","name":"[internal] load build definition from Dockerfile","started":"2026-05-04T10:13:16.388057275Z"}]}
        	            	{"statuses":[{"id":"transferring dockerfile:","vertex":"sha256:eb41b01ac64682c04903fb8875ecac0c8c66e502d7d06926911e213505ac4afe","name":"transferring","current":0,"timestamp":"2026-05-04T10:13:16.501006806Z","started":"2026-05-04T10:13:16.501006355Z"}]}
        	            	{"statuses":[{"id":"transferring dockerfile:","vertex":"sha256:eb41b01ac64682c04903fb8875ecac0c8c66e502d7d06926911e213505ac4afe","name":"transferring","current":29,"timestamp":"2026-05-04T10:13:16.501843156Z","started":"2026-05-04T10:13:16.501006355Z"}]}
        	            	{"statuses":[{"id":"transferring dockerfile:","vertex":"sha256:eb41b01ac64682c04903fb8875ecac0c8c66e502d7d06926911e213505ac4afe","name":"transferring","current":79,"timestamp":"2026-05-04T10:13:16.503558914Z","started":"2026-05-04T10:13:16.501006355Z","completed":"2026-05-04T10:13:16.503558653Z"}]}
        	            	{"vertexes":[{"digest":"sha256:eb41b01ac64682c04903fb8875ecac0c8c66e502d7d06926911e213505ac4afe","name":"[internal] load build definition from Dockerfile","started":"2026-05-04T10:13:16.388057275Z","completed":"2026-05-04T10:13:16.505467436Z"}]}
        	            	{"logs":[{"vertex":"sha256:0dbd2b21ddaf036d6ee8e1135b5e7285130ce6956d989828882d35da41d8c7b2","stream":1,"data":"Y2hlY2tpbmcgcG9saWN5IGZvciBzb3VyY2UgZG9ja2VyLWltYWdlOi8vZG9ja2VyLmlvL2xpYnJhcnkvYnVzeWJveDpsYXRlc3QgKGxpbnV4L2FtZDY0KQo=","timestamp":"2026-05-04T10:13:16.514109336Z"}]}
        	            	{"logs":[{"vertex":"sha256:0dbd2b21ddaf036d6ee8e1135b5e7285130ce6956d989828882d35da41d8c7b2","stream":1,"data":"cG9saWN5IGRlY2lzaW9uIGZvciBzb3VyY2UgZG9ja2VyLWltYWdlOi8vZG9ja2VyLmlvL2xpYnJhcnkvYnVzeWJveDpsYXRlc3QgKGxpbnV4L2FtZDY0KTogREVOWQo=","timestamp":"2026-05-04T10:13:16.518098191Z"}]}
        	            	{"vertexes":[{"digest":"sha256:0dbd2b21ddaf036d6ee8e1135b5e7285130ce6956d989828882d35da41d8c7b2","name":"loading policies /tmp/TestIntegrationTestBuildPolicyDenyProgressStreamworker=remote844644086/001/policy.rego","started":"2026-05-04T10:13:16.390847815Z","completed":"2026-05-04T10:13:17.018575648Z"}]}
        	            	Dockerfile:2
        	            	--------------------
        	            	   1 |     
        	            	   2 | >>> FROM busybox:latest
        	            	   3 |     RUN echo policy-nope
        	            	   4 |     
        	            	--------------------
        	            	ERROR: failed to build: failed to solve: busybox:latest: failed to resolve source metadata for docker.io/library/busybox:latest: could not resolve image due to policy: source "docker-image://docker.io/library/busybox:latest" not allowed by policy: action DENY
    sandbox.go:202: stderr: /usr/bin/buildkitd --oci-worker=true --containerd-worker=false --oci-worker-gc=false --oci-worker-labels=org.mobyproject.buildkit.worker.sandbox=true --config=/tmp/bktest_config2568116162/buildkitd.toml --root /tmp/bktest_buildkitd3303398044 --addr unix:///tmp/bktest_buildkitd3303398044/buildkitd.sock --debug
    sandbox.go:205: > StartCmd 2026-05-04 10:13:15.995228898 +0000 UTC m=+52.512516760 /usr/bin/buildkitd --oci-worker=true --containerd-worker=false --oci-worker-gc=false --oci-worker-labels=org.mobyproject.buildkit.worker.sandbox=true --config=/tmp/bktest_config2568116162/buildkitd.toml --root /tmp/bktest_buildkitd3303398044 --addr unix:///tmp/bktest_buildkitd3303398044/buildkitd.sock --debug
    sandbox.go:205: time="2026-05-04T10:13:16Z" level=debug msg="debug handlers listening at unix:///tmp/bktest_buildkitd3303398044/buildkitd-debug.sock"
    sandbox.go:205: time="2026-05-04T10:13:16Z" level=info msg="auto snapshotter: using overlayfs"
    sandbox.go:205: time="2026-05-04T10:13:16Z" level=warning msg="using host network as the default"
    sandbox.go:205: time="2026-05-04T10:13:16Z" level=info msg="found worker \"giqgegh6b3z1d1pf6mucl8ake\", labels=map[org.mobyproject.buildkit.worker.executor:oci org.mobyproject.buildkit.worker.hostname:a79b9240a8fb org.mobyproject.buildkit.worker.network:host org.mobyproject.buildkit.worker.oci.process-mode:sandbox org.mobyproject.buildkit.worker.sandbox:true org.mobyproject.buildkit.worker.selinux.enabled:false org.mobyproject.buildkit.worker.snapshotter:overlayfs], platforms=[linux/amd64 linux/amd64/v2 linux/amd64/v3 linux/amd64/v4 linux/arm64 linux/riscv64 linux/ppc64le linux/s390x linux/386 linux/mips64le linux/mips64 linux/loong64 linux/arm/v7 linux/arm/v6]"
    sandbox.go:205: time="2026-05-04T10:13:16Z" level=info msg="found 1 workers, default=\"giqgegh6b3z1d1pf6mucl8ake\""
    sandbox.go:205: time="2026-05-04T10:13:16Z" level=warning msg="currently, only the default worker can be used."
    sandbox.go:205: time="2026-05-04T10:13:16Z" level=info msg="running server on /tmp/bktest_buildkitd3303398044/buildkitd.sock"
    sandbox.go:205: time="2026-05-04T10:13:16Z" level=debug msg="session started" spanID=957f3131c1880dce traceID=0e32c88ed95873d52d7ee2dd4a08ab9a
    sandbox.go:205: time="2026-05-04T10:13:16Z" level=debug msg="session finished: <nil>" spanID=957f3131c1880dce traceID=0e32c88ed95873d52d7ee2dd4a08ab9a
    sandbox.go:205: time="2026-05-04T10:13:16Z" level=debug msg="session started" spanID=de4cb2946c0e1dbd traceID=0e32c88ed95873d52d7ee2dd4a08ab9a
    sandbox.go:205: time="2026-05-04T10:13:16Z" level=debug msg="new ref for local: r6ywyd19ybubbeva1fvwgpt2f" span="[internal] load build definition from Dockerfile" spanID=c2aa85625d60ef71 traceID=0e32c88ed95873d52d7ee2dd4a08ab9a
    sandbox.go:205: time="2026-05-04T10:13:16Z" level=debug msg="diffcopy took: 2.507838ms" span="[internal] load build definition from Dockerfile" spanID=da73618f8d82958b traceID=0e32c88ed95873d52d7ee2dd4a08ab9a
    sandbox.go:205: time="2026-05-04T10:13:16Z" level=debug msg="saved r6ywyd19ybubbeva1fvwgpt2f as dockerfile:dockerfile:001:eb4f2b64f51fa455" span="[internal] load build definition from Dockerfile" spanID=c2aa85625d60ef71 traceID=0e32c88ed95873d52d7ee2dd4a08ab9a
    sandbox.go:205: time="2026-05-04T10:13:16Z" level=error msg="/moby.buildkit.v1.frontend.LLBBridge/Solve returned error: rpc error: code = Unknown desc = busybox:latest: failed to resolve source metadata for docker.io/library/busybox:latest: could not resolve image due to policy: source \"docker-image://docker.io/library/busybox:latest\" not allowed by policy: action DENY" spanID=92f0906beefd88c3 traceID=0e32c88ed95873d52d7ee2dd4a08ab9a
    sandbox.go:205: busybox:latest: failed to resolve source metadata for docker.io/library/busybox:latest: could not resolve image due to policy: source "docker-image://docker.io/library/busybox:latest" not allowed by policy: action DENY
    sandbox.go:205: 24639 v0.26.3 buildkitd --oci-worker=true --containerd-worker=false --oci-worker-gc=false --oci-worker-labels=org.mobyproject.buildkit.worker.sandbox=true --config=/tmp/bktest_config2568116162/buildkitd.toml --root /tmp/bktest_buildkitd3303398044 --addr unix:///tmp/bktest_buildkitd3303398044/buildkitd.sock --debug
    sandbox.go:205: github.com/moby/buildkit/solver/llbsolver.(*policyEvaluator).Evaluate

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions