Skip to content

Conversation

@thaJeztah
Copy link

Could use a claner option, and probably we should move the test to "integration/", but this works for now, because the events API didn't change since 17.06, and we just specify a newer version of the API (which, technicaly, the 17.06 CLI doesn't support, but DOCKER_API_VERSION allows any version to be set).

Could use a claner option, and probably we should move the
test to "integration/", but this works for now, because
the events API didn't change since 17.06, and we just
specify a newer version of the API (which, technicaly, the
17.06 CLI doesn't support, but DOCKER_API_VERSION allows any
version to be set).

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Comment on lines +276 to +282
shouldSkip := func(ev events.Message) bool { return false }
if versions.LessThan(httputils.VersionFromContext(ctx), "1.46") {
// Image create events were added in API 1.46
shouldSkip = func(ev events.Message) bool {
return ev.Type == "image" && ev.Action == "create"
}
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this slightly from your original approach so that we don't have to do the version compare in each iteration, but instead set up a filter function once.

@vvoland vvoland merged commit d37fc2b into vvoland:image-create Jun 17, 2024
@thaJeztah thaJeztah deleted the image_create_suggestion branch June 17, 2024 08:55
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.

2 participants