Open
Conversation
Author
|
Running against Podman locally and on my fork, I get these failures consistently. Failures:
1) Docker::Connection#resource resource
Failure/Error: its(:resource) { should be_a Excon::Connection }
NoMethodError:
private method `resource' called for an instance of Docker::Connection
# ./spec/docker/connection_spec.rb:69:in `block (3 levels) in <top (required)>'
2) Docker::Image.create with a block capturing create output calls the block and passes build output
Failure/Error: expect(create_output).to match(/ulling.*busybox/)
expected "{\"status\":\"Pulling fs layer\",\"progressDetail\":{},\"id\":\"086517b4ab5d\"}\n{\"status\":\"Downl...7f65c9eee073\"}\n{\"status\":\"Download complete\",\"progressDetail\":{},\"id\":\"7f65c9eee073\"}\n" to match /ulling.*busybox/
Diff:
@@ -1 +1,5 @@
-/ulling.*busybox/
+{"status":"Pulling fs layer","progressDetail":{},"id":"086517b4ab5d"}
+{"status":"Download complete","progressDetail":{},"id":"086517b4ab5d"}
+{"status":"Pulling fs layer","progressDetail":{},"id":"7f65c9eee073"}
+{"status":"Download complete","progressDetail":{},"id":"7f65c9eee073"}
+{"status":"Download complete","progressDetail":{},"id":"7f65c9eee073"}
# ./spec/docker/image_spec.rb:479:in `block (4 levels) in <top (required)>'
3) Docker::Image#push when there are no credentials still pushes
Failure/Error: expect { raise(ex) }.to_not raise_error
expected no Exception, got #<Docker::Error::ServerError:"{\"errorDetail\":{\"message\":\"trying to reuse blob sha256:83df073ecb7...5000: Get \\\"https://localhost:5000/v2/\\\": http: server gave HTTP response to HTTPS client\"}\n"> with backtrace:
# ./lib/docker/connection.rb:91:in `rescue in request'
# ./lib/docker/connection.rb:46:in `request'
# ./lib/docker/connection.rb:111:in `block (2 levels) in <class:Connection>'
# ./lib/docker/image.rb:37:in `push'
# ./spec/docker/image_spec.rb:220:in `block (4 levels) in <top (required)>'
# ./spec/docker/image_spec.rb:225:in `rescue in block (4 levels) in <top (required)>'
# ./spec/docker/image_spec.rb:219:in `block (4 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# Excon::Error::InternalServerError:
# Expected([200, 201, 202, 203, 204, 301, 304]) <=> Actual(500 InternalServerError)
# ./vendor/bundle/ruby/3.3.0/gems/excon-1.2.7/lib/excon/middlewares/expects.rb:13:in `response_call'
Finished in 1 minute 43.63 seconds (files took 1.07 seconds to load)
221 examples, 3 failures, 31 pending
Failed examples:
rspec ./spec/docker/connection_spec.rb:69 # Docker::Connection#resource resource
rspec ./spec/docker/image_spec.rb:477 # Docker::Image.create with a block capturing create output calls the block and passes build output
rspec ./spec/docker/image_spec.rb:218 # Docker::Image#push when there are no credentials still pushes |
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 existing
podman-rspecjob in theunit_test.yamlworkflow only installed Podman, but never started the engine. As a result the tets still talked to the pre-installed Docker daemon on/var/run/docker.sock, since that's what it defaults to.Docker.podman?never returnedtrueand we were silently re-running the test suite with Docker.https://github.com/actions/runner-images/blob/27d8a9d9026ab6e207340dde6e14f4faf3864e29/images/ubuntu/scripts/build/install-docker.sh#L60-L61
You can see that in the
podman-rspectest runs, there are no specs skipped due toskip('Not supported on podman') if ::Docker.podman?, meaning we're not using Podman.Proposed solution
1. Start a real Podman API service
podman system service unix://…is launched in the runner’s home directory and kept alive for the whole job.2. Point the test suite at that socket
We export
DOCKER_HOSTso the gem connects to Podman, and set anEXPECT_PODMANflag.3. Fail fast if mis-configured
A guard in
spec_helper.rbhard-exits whenEXPECT_PODMAN=truebutDocker.podman?is stillfalse.4. Remove Podman installation (Maybe?)
Podman is already pre-installed on GitHub Ubuntu runners so the custom install script is no longer called. But, perhaps it's better to keep it to ensure it's always available.
Additional notes
EXPECT_PODMAN=true.