ci: Add conditional CI for the containerd backed image store#138
Closed
ci: Add conditional CI for the containerd backed image store#138
Conversation
955bd80 to
c194553
Compare
Reduce some of the boiler-plating, and by combining the tests, we skip the testenv.Clean() in between each of the tests. Performance gain isn't really measurable, but every bit should help :) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
CI: Switch to use tracing action
Images built by classic builder will have an additional label (in the containerd image object, not image config) pointing to a parent of that image. This allows to differentiate intermediate images (dangling images created as a result of a each Dockerfile instruction) from the final images. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
To avoid collision with TestBuildMultiStageArg. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
In some cases, when the daemon launched by a test panics and quits, the cleanup code would end with an error when trying to kill it by its pid. In those cases the whole suite will end up waiting for the daemon that we start in .integration-daemon-start to finish and we end up waiting 2 hours for the CI to cancel after a timeout. Using process substitution makes the integration tests quit. Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
- The `Version` field was not used for any purpose, other than a debug log
- The `X-Docker-Registry-Version` header was part of the registry v1 spec,
however, as we're not using the `Version` field, we don't need the
header for anything.
- The `X-Docker-Registry-Config` header was only set by the mock registry;
there's no code consuming it, so we don't need to mock it (even if an
actual v1 registry / search API would return it).
It's also worth noting that we never call the `_ping` endpoint when using
Docker Hub's search API, and Docker Hub does not even implement the `_ping`
endpoint;
curl -fsSL https://index.docker.io/_ping | head -n 4
<!DOCTYPE html>
<html lang="en">
<head>
<title>Docker</title>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
With containerd image store the images don't depend on each other even if they share the same content and it's totally fine to delete the "parent" image. The skip is necessary because deleting the "parent" image does not produce an error with the c8d image store and deleting the `busybox` image breaks other tests. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
We don't really want the daemon to panic for this so let's log a warning about max downloads and uploads Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
…lone This function was making a request to the `_ping` endpoint, which (if implemented) would return a JSON response, which we unmarshal (the only field we use from the response is the `Standalone` field). However, if the response had a `X-Docker-Registry-Standalone`, that header took precedence, and would overwrite the earlier `Standalone` value we obtained from the JSON response. This patch adds a fast-path for situations where the header is present, in which case we can skip handling the JSON response altogether. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
We have the response available, which is an io.Reader, so we don't have to read the entire response into memory before decoding. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Also remove log from `validateEndpoint`, because we don't actually ping the default (Docker Hub). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Add env variable that allows to run integration-cli tests with cgroup v2 enabled. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Fixes TestInspectByPrefix when running with c8d snapshotters enabled. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
validateEndpoint uses `v1Endpoint.ping` to verify if the search API can use a secure connection, and to fall back to basic auth. For Docker Hub, we don't allow insecure connections, and `v1Endpoint.ping` will not connect to Docker Hub (Docker Hub also does not implement the `_ping` endpoint, so doing so would always fail). Let's make it more clear that we don't do any validation, and return early. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
c8d: Remove the panic from UpdateConfig
Use process substitution to redirect to tee
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
c8d/image: Allow truncated id to have sha256: prefix
Removes uses of the github.com/opencontainers/runc/libcontainer/devices package. full diff: cncf-tags/container-device-interface@v0.6.0...v0.6.1 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Without these compile flags, Delve is unable to report the value of some variables and it's not possible to jump into inlined code. As the contributing docs already mention that `DOCKER_DEBUG` should disable "build optimizations", the env var is reused here instead of introducing a new one. Signed-off-by: Albin Kerouanton <albinker@gmail.com>
integration-cli: Skip TestRmiParentImageFail when using c8d snapshotters
…vars Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This utility was setting the content-type header after WriteHeader was called, and the header was not sent because of that. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The test was depending on the client constructing an error based on the http-status code, and the client not reading the response body if the response was not a JSON response. This fix; - adds the correct content-type headers in the response - includes error-messages in the response - adds additional tests to cover both the plain (non-JSON) and JSON error responses, as well as an empty response. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
remove some intermediate vars, and small refactor for error-handling
internal: Add compatcontext.WithoutCancel
fix faulty tests for distribution-client
Related discussion in docker-library/golang#472 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This required changes to the download-URL, as downloads are now provided
using the full version (including the `.0` patch version);
curl -sI https://go.dev/dl/go1.21.windows-amd64.zip | grep 'location'
location: https://dl.google.com/go/go1.21.windows-amd64.zip
curl -sI https://dl.google.com/go/go1.21.windows-amd64.zip
HTTP/2 404
# ...
curl -sI https://dl.google.com/go/go1.21.0.windows-amd64.zip
HTTP/2 200
# ...
Unfortunately this also means that the GO_VERSION can no longer be set to
versions lower than 1.21.0 (without additional changes), because older
versions do NOT provide the `.0` version, and Go 1.21.0 and up, no longer
provides URLs _without_ the `.0` version.
Co-authored-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
aede51d to
88a3a00
Compare
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
c8d: Adjust some integration-cli tests
vendor.mod: bump go line to 1.20
update to go1.21.1, default to GOTOOLCHAIN=local
20126b0 to
24cf1a6
Compare
Moving these jobs to reusable workflows to declutter the test.yaml workflow, this will also help reuse these workflows to run tests with the container-snapshotter feature enabled Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
This workflow will run all the tests (unit, integration and integration-cli) with the containerd-snapshotter feature enalbed. We only run these tests for pull requests that have the "containerd-integration" label and also on any other branch/tag. Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
24cf1a6 to
1952344
Compare
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.
Any PR that has the label
containerd-integrationwill also run tests with the snapshotters- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)