When LocalDirs were changed to LocalMounts, this broke the
sharedKey computation that was based on the context directory
path. SharedKey defines if directory is valid candidate for
incremental context transfer and if not set properly then
different directories do metadata-based transfers to same destination.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This makes the code slightly more idiomatic, but the errors produced will
change slightly to prevent having to path NamedContext as argument.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This package is part of the classic builder, and was currently only used
for the IsURL utility, which is a very rudimentary check for a string having
a "https://" or "http://" scheme.
This patch copies the code as non-exported functions where they're used to
remove the dependency.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
hasDigest would always be true when reaching this code, because the function
would return with an error when failing to resolve the digest;
if !hasDigest {
return nil, errors.Errorf("oci-layout reference %q could not be resolved", v.Path)
}
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
hasTag was always true as it was set to "true" when missing, in which case
the default (`:latest`) tag was applied;
localPath, tag, hasTag := strings.Cut(localPath, ":")
if !hasTag {
tag = "latest"
hasTag = true
}
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Currently it is possible for boot() to be called
multiple times, resulting multiple slow requests to
establish connection (eg. multiple container inspects
for container driver).
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Contexts using target: schema are replaced by input: pointing
to previous build result before build request is sent. Currently
this replacement did not work if multiple contexts pointed to
the same target name.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This eases build driver migrations, as it allows aligning the default behavior.
See also https://docs.docker.com/build/drivers/
Signed-off-by: Niklas Gehlen <niklas@namespacelabs.com>
This refactors the driver handle to initialize the tracer delegate
inside of the driver handle instead of the individual plugins.
This provides more uniformity to how the tracer delegate is created by
allowing the driver handle to pass additional client options to the
drivers when they create the client. It also avoids creating the tracer
delegate client multiple times because the driver handle will only
initialize the client once. This prevents some drivers, like the remote
driver, from accidentally registering multiple clients as tracer
delegates.
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>