A manifest with no media type was taken for an image index when it had a
"manifests" key, even when its value is null. It is now an index only when
that value is a list.
writeCacheEntryManifest reported every failure to create the directory
holding the manifest as an invalid OCI artifact. Only the collision with a
file of the artifact of that name is one; any other failure (missing
directory, permission, full disk) is the host's and is now returned as it is.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
The media type a registry reports with a manifest is not authenticated, only
the content is: a registry could serve the authentic bytes of an image index
under the media type of a manifest, which was then read as one, extracted as
nothing and cached as a complete entry that holds no compose file.
The document is now read as what it says it is, and a registry that reports
another type for it is refused. An entry is only put in place once it holds the
compose file that is loaded from it.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
An entry of the cache of extracted projects was taken as complete as soon as
its directory, or a marker file in it, was there. An artifact chooses, through
the annotations of its layers, the files it writes in that directory, so it can
write a marker itself, and so did what releases that did not verify the
manifests they fetched had cached there: neither proves that the directory is
the extraction of the artifact it is named after, or that the extraction ended.
The entries of OCI artifacts, in the oci directory of the cache, now hold the
manifest they were extracted from, as the registry served it (the index when
the reference is an image index), in a .manifest directory of their own. An
artifact names the files of an entry without a path separator, so it can't
write in a directory of it: what is in .manifest was put there by Compose,
which refuses an artifact that has a file of that name. A directory is an entry
for a digest only when it is named after it and holds the manifest that has it,
a check which needs no registry and holds offline. A directory without one, or
with the manifest of another digest, is not an entry.
To make the manifest mean that the entry is complete, the entry is extracted
aside, the manifest is written last, and the directory is moved in place in one
step: nothing is in place which is not complete, so a run never finds an entry
without its manifest. What is in place and is not an entry is set aside and
replaced, never completed, and a run that finds the entry in place after another
run uses it. What earlier releases cached is at the root of the cache, where
nothing looks for it any more.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Get returned the manifest the registry served without checking it against
the digest of the descriptor: the one of the reference when it is digested,
the one the registry announces in Docker-Content-Digest when it is a tag.
Neither is checked by containerd on this path, which doesn't go through its
content store, and GetBlob already checks what it fetches for that reason.
The extracted project cache is keyed by that digest alone, whatever the
registry, so a registry could have its content cached as the one of another
manifest, which a later load of the pinned digest, from the registry that
holds it, then returned.
Get now fails when the manifest doesn't hash to its digest, and shares the
check with GetBlob.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This release includes 12 security fixes following the security policy:
- net/http: HTTP/1 server crash due to MaxBytesReader header race
For HTTP/1 servers, when MaxBytesReader's limit is exceeded,
"Connection: close" header is automatically set without synchronization,
which might race with another header being set explicitly in the server
handler. As a result, an HTTP/1 server that utilizes MaxBytesReader or
MaxBytesHandler can crash due to runtime panic if its handler reads the
request body concurrently with writing the response header.
Thanks to Jakub Ciolek (https://ciolek.dev) for reporting this issue.
This is CVE-2026-97054 and Go issue https://go.dev/issue/82563.
- cmd/go: unexpected code execution via --sysroot, -target, -isysroot, -Wl,-syslibroot, and -x cgo flags
Building a malicious package that uses cgo could cause arbitrary code execution
at build time through several compiler and linker flags permitted in "#cgo"
directives.
Specifically, "--sysroot" in GCC and Clang relocates compiler subprograms, spec
files, and CRT startup objects to an attacker-controlled directory; "-target" in
Clang falls back to executing target helper tools from the current working
directory when not found in PATH; "-isysroot" and "-Wl,-syslibroot" can pass a
regular file on disk to GNU ld.bfd, which interprets it as a positional linker
script; and "-x" permitted specifying arbitrary compiler input languages beyond
those supported by cgo.
"--sysroot" and "-target" are now disallowed in "#cgo" flags, "-isysroot" and
"-Wl,-syslibroot" are verified not to point to regular files, and "-x" is
restricted to the C, C++, Objective-C, and assembler languages supported by cgo.
This issue was found by the Go Security Team during an internal audit.
This is CVE-2026-97033 and Go issue https://go.dev/issue/82577.
- cmd/go: arbitrary command execution via GCC spec files in cgo linker search directories
When using GCC, building a malicious package that uses cgo could cause arbitrary
command execution at link time via untrusted GCC spec files ("specs" or
"*.spec").
When linking with "-fopenmp", "-fopenacc", or "-fsanitize=" in "#cgo LDFLAGS",
GCC's built-in link spec evaluates "%:include(libgomp.spec)" or
"%:include(libsanitizer.spec)" and searches for spec files in "-L" and sysroot
directories (including subdirectories and multilib sibling directories such as
"../lib64"), as well as the working directory when "-fopenmp" or "-fopenacc" is
used or when "-fsanitize=" is combined with "-static" or "-static-lib*".
The go command now rejects "-L", "-isysroot", and "-Wl,-syslibroot" directories
(and the working and package directories when applicable) that contain GCC spec
files, and disallows "@" and "-" prefixes in "-fsanitize=" compiler flag values.
This issue was found by the Go Security Team during an internal audit.
This is CVE-2026-97034 and Go issue https://go.dev/issue/82576.
- cmd/go: unexpected code execution and arbitrary file write via Clang -gen-* and GCC -gnat* flags in cgo
When using Clang or GCC, building a malicious package that uses cgo could cause
unexpected code execution at build time or write files to arbitrary
directories via "-gen-" or "-gnat" flags in "#cgo" directives.
The "-g*" wildcard in the compiler and linker flag allowlists previously
matched Clang's two-argument "-gen-cdb-fragment-path " flag and GCC's
two-argument "-gnatO " flag, permitting compilation database fragments
and sidecar output files to be written to arbitrary directories and
desynchronizing flag argument parsing between the go command and the compiler
driver so that subsequent arguments could be passed as unvalidated positional
inputs to the linker.
"-gen-" and "-gnat" flags are now disallowed in "#cgo" compiler and linker
flags.
This issue was found by the Go Security Team during an internal audit.
This is CVE-2026-97035 and Go issue https://go.dev/issue/82575.
- cmd/go: arbitrary code execution during build on darwin via "-l to_library" in cgo
On Darwin, building a malicious package that uses cgo could cause arbitrary code
execution when using the Apple linker due to passing "-l to_library " in a
"#cgo LDFLAGS" directive.
The Apple linker recombines the separated arguments "-l" and "to_library" into
"-lto_library", which loads an arbitrary LTO plugin dynamic library at link
time.
The go command now disallows "-l" followed by "to_library" in "#cgo LDFLAGS",
rejects "-lazy_library", "-lazy_framework", "-load_hidden", "-library", and
"-library-path", and checks recombined "-l" arguments against disallowed linker
flags and patterns.
Thanks to Ali Sherif (https://www.linkedin.com/in/ali-sherif-13812b276/) for reporting this issue.
This is CVE-2026-97036 and Go issue https://go.dev/issue/82574.
- cmd/go: linker script injection via split -Wl, flags and Darwin or symbol linker flags in cgo
Building a malicious package that uses cgo could cause arbitrary code execution
at link time by passing linker script files to the host linker via "#cgo LDFLAGS".
Split "-Wl," flags that consume a following argument (such as "-Wl,-rpath",
"-Wl,--just-symbols", and "-Wl,-undefined") previously accepted a bare second
argument without a "-Wl," prefix, which the compiler driver passes directly to
the linker as a positional input file. Additionally, when using GNU ld.bfd,
flags such as "-framework", "-Wl,-framework", "-Wl,-undefined",
"-Wl,--just-symbols", "-Wl,-R", "-Wl,-subsystem", and (on non-Darwin platforms)
"-Wl,-sectcreate" could cause ld.bfd to interpret their arguments as linker
scripts if they named a regular file on disk.
The go command now requires a "-Wl," prefix on the second token of split "-Wl,"
flags (except "-Wl,-R"), verifies that these flags do not reference linker
script files, and disallows bare "-Wl,--warn-backrefs-exclude".
This issue was found by the Go Security Team during an internal audit.
This is CVE-2026-97037 and Go issue https://go.dev/issue/82573.
- cmd/go: arbitrary code execution via crafted .syso files and cgo linker input files
Building a malicious package containing ".syso" files or cgo linker inputs could
inject arbitrary linker flags or execute arbitrary code at link time.
Linker input files—including ".syso" files, direct object or library inputs in
"#cgo LDFLAGS", and libraries in "-L" directories—were passed to the external
linker without validating their format or checking for embedded linker options.
Across platforms, this allowed executing GNU ld implicit linker scripts
disguised as libraries or ".syso" files (or loaded via "-l:" or "-l"
containing path separators), injecting unallowlisted linker flags via PE/COFF
".drectve" sections on Windows or Mach-O "LC_LINKER_OPTION" load commands on
Darwin, or invoking LTO plugins via GCC or LLVM LTO intermediate representation
sections in ELF, PE/COFF, or Mach-O objects.
The go command now verifies that ".syso" files, direct linker inputs, and
libraries in "-L" directories are valid binary objects or archives that do not
contain unallowlisted ".drectve" directives, "LC_LINKER_OPTION" load commands,
or LTO IR sections, and disallows "-l:" and ":", "=", or path
separators in "-l" flags.
This issue was found by the Go Security Team during an internal audit.
This is CVE-2026-97038 and Go issue https://go.dev/issue/82572.
- cmd/go: flag sanitization bypass via "#cgo pkg-config:" directives
Building a malicious package that uses "#cgo pkg-config:" directives could
load untrusted pkg-config ".pc" files or inject unvalidated compiler and linker
flags.
The pkg-config flag allowlist previously permitted "--with-path=" and
"--personality=", allowed "--define-variable=" values beginning with "=" or "$"
(which can rewrite paths in system ".pc" files into sysroot-prefixed "-L=" or
"-L$SYSROOT" linker search paths), and allowed package arguments ending in ".pc"
or containing path separators or "..", which caused pkg-config to load local
".pc" files directly from the package directory. In addition, flags returned by
"pkg-config --cflags" in cgoCPPFLAGS were not checked when determining whether
internal linking is safe.
The go command now disallows "--with-path=", "--personality=", leading "=" or
"$" characters in "--define-variable=" values, and local ".pc" paths in
"#cgo pkg-config:" directives, and inspects cgoCPPFLAGS when checking internal
linking compatibility.
This issue was found by the Go Security Team during an internal audit.
This is CVE-2026-97039 and Go issue https://go.dev/issue/82571.
- cmd/go, cmd/link: cgo directive injection via .syso files disguised as Go object files
Building a package containing a crafted ".syso" file could bypass cgo flag
validation and inject arbitrary linker flags when linking.
When loading ".syso" entries from a package archive, the linker only checked for
recognized host object headers (ELF, Mach-O, PE, and XCOFF) before falling
through to Go object parsing. A ".syso" file beginning with a "go object" header
was parsed as a Go compiler object, allowing untrusted cgo metadata directives
(such as "cgo_ldflag" or "cgo_dynamic_linker") embedded in the ".syso" file to
be passed to the external linker without validation. Additionally, ".syso"
filenames longer than 16 bytes lost their ".syso" extension when truncated in
archive headers, and unrecognized ".syso" formats forced external linking in
pure-Go builds.
The linker now rejects ".syso" files that are not recognized host object
formats, and "cmd/go" and "cmd/pack" preserve the ".syso" suffix when truncating
long archive member names.
Thanks to RyotaK (https://ryotak.net) of GMO Flatt Security Inc. for reporting this issue.
This is CVE-2026-97040 and Go issue https://go.dev/issue/82570.
- cmd/compile, cmd/link: host linker flag injection via //go:cgo_* directives
Building a malicious package containing "//go:cgo_*" compiler directives could
inject arbitrary flags into the external linker invocation on ELF platforms.
The compiler and linker did not reject commas in "//go:cgo_import_dynamic",
"//go:cgo_export_dynamic", "//go:cgo_export_static", "//go:cgo_import_static",
and "//go:cgo_dynamic_linker" directives, and the linker passed the dynamic
linker path using "-Wl,--dynamic-linker,". Furthermore, the two-argument
form of "//go:cgo_import_dynamic" (which is permitted in non-cgo Go source
files) could overwrite the external symbol name of a symbol already marked for
cgo export. A symbol name or dynamic linker path containing a comma or leading
"@" could split "-Wl,--export-dynamic-symbol=" or "-Wl,--dynamic-linker," into
arbitrary host linker flags or response file arguments.
The compiler and linker now reject commas in "//go:cgo_*" symbol and dynamic
linker directives, the linker passes "-Wl,--dynamic-linker=", and
"cgo_import_dynamic" no longer overwrites symbols exported via
"cgo_export_dynamic" or "cgo_export_static".
Thanks to RyotaK (https://ryotak.net) of GMO Flatt Security Inc. for reporting this issue.
This is CVE-2026-97041 and Go issue https://go.dev/issue/82569.
- cmd/cgo, cmd/compile, cmd/link: linker flag injection via cgo_import_dynamic and PE DLL names
Building a malicious package that uses "//go:cgo_import_dynamic" or links
against a crafted PE object on Windows could pass unsafe library arguments to
the external linker.
The compiler only checked the first character of the library name in
"//go:cgo_import_dynamic" directives and skipped validation in cgo-generated
files. In addition, on Windows, "cmd/cgo" and "cmd/link" did not validate
imported DLL names extracted from PE object files before emitting "-l"
flags for the external linker, allowing a crafted DLL name containing ".." path
traversal or special characters to reference arbitrary files on disk.
The compiler now validates every character of the library name in
"//go:cgo_import_dynamic" directives (including in cgo-generated files on
Windows) and rejects ".." path traversal, and "cmd/cgo" and "cmd/link" reject
PE imported DLL names containing path separators, "..", ":", or leading "-" or
"@".
This issue was found by the Go Security Team during an internal audit.
This is CVE-2026-97042 and Go issue https://go.dev/issue/82568.
- cmd/go, cmd/compile: unexpected code execution via escaped quotes in //go:cgo_ldflag
Building a malicious package that uses cgo could bypass "#cgo LDFLAGS"
validation and cause unexpected code execution at build time, or cause the go
command to panic, via crafted quoting in "//go:cgo_ldflag" directives.
When "cmd/cgo" generates "_cgo_gotypes.go", it quotes each "#cgo LDFLAGS"
argument with strconv.Quote in a "//go:cgo_ldflag" directive, but "cmd/compile"
and "cmd/go" parsed those directives by splitting on raw quote characters
without handling backslash escapes or unquoting the string. This mismatch
allowed disallowed linker flags or unvalidated linker search paths to be
smuggled past the go command's flag checks and passed to the external linker.
In addition, deduplicating LDFLAGS in the go command could panic with an
out-of-bounds slice index when a prefix of the flag list matched near the end
of the slice.
"cmd/compile" and "cmd/go" now properly handle backslash-escaped quotes and
unquote "//go:cgo_*" pragma strings with strconv.Unquote, and the slice bounds
check in processCgoOutputs has been fixed.
This issue was found by the Go Security Team during an internal audit.
This is CVE-2026-97043 and Go issue https://go.dev/issue/82567.
release notes: https://go.dev/doc/devel/release#go1.27.4
Signed-off-by: Paweł Gronowski <git@grono.dev>
Go 1.27 makes SystemCertPool respect SSL_CERT_FILE and SSL_CERT_DIR on
Windows and macOS, switching to Go's certificate verifier when either
variable is set.
Update to align certificate environment variable handling across our CLI
binaries, avoiding differences based on the Go version used to build them.
See: https://go.dev/doc/go1.27#crypto/x509
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The cache of remote resources now has one directory for each kind of resource:
the checkouts of Git repositories are in "git", and the extracted OCI artifacts
are in "oci" rather than at the root of the cache.
What earlier releases left at the root of the cache is no longer looked for: an
artifact is pulled again the first time it is used.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
A commit was checked out directly into its directory of the cache, which was
then taken for complete as soon as it existed: a run interrupted during the
fetch or the checkout left a partial directory that every later run used.
The checkout is now made in a directory of its own and renamed to the one of the
commit once it is complete, so the directory of a commit is never a partial
checkout, and no file beside it is needed to tell. Checkouts live in a "git"
directory of the cache, and what earlier releases left at the root of the cache
is no longer looked for.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
A run whose replacement of a directory that is not an entry failed put
that directory back unconditionally. Another run having set aside the
entry that took its place in the meantime, the directory put back stood
in the way of the final rename of that run, whose deferred removal then
deleted the complete entry it had set aside: the cache ended with the
incomplete directory after a run returned success.
Only a complete entry is worth restoring, so the restore is guarded.
A run that loses to another may still return an error: the concurrency
test now pins the path of the entry for the runs that succeed, and the
state of the cache once all of them are over.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
When a run replaces a directory of the cache that is not a complete entry, it
sets it aside before removing it, so that it does not remove the entry that
another run has put in place in the meantime. The place it is set aside in
is now a temporary directory of its own, so that two runs replacing the same
entry at the same time never share one.
If the extracted entry can't be moved in place after that, and nothing else
took the place of what was set aside, it is put back instead of being removed
with the rest.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
An entry of the cache of extracted projects was taken as complete as soon as
its directory existed, while the files were written into it one after the
other. A run interrupted in the middle of an extraction, or another run that
loads the same artifact at the same time, left a directory that was then used
as it was, with some of the files missing.
The project is now extracted in a temporary directory of the cache, a
.complete marker is written last, and the directory is moved in place in one
step. A directory of the cache without the marker is not an entry: it is
extracted again, and replaced, never completed. A run that finds the entry
in place after another run uses it.
The entries written by the previous releases have no marker, so each one is
extracted again the first time it is used.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Networks and volumes are created by plan nodes, yet createNetwork and
createVolume still emitted their own events on top of the executor's, so
each line showed twice.
A failing node also reported its error under the plan's internal ID
(service:web:1, network:front), not under the row it had opened. Container
rows stayed on Creating and consumers keying on the ID saw rows nothing
opened.
Make the executor the only emitter and name the row through one helper.
Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
Scope image pruning to selected services and their dependents. Keep
images of declared but unselected services when removing orphans.
Fixes#14453
Signed-off-by: Seyed Noorollah Aghayenoor <noorollah.aghayenoor@gmail.com>
run forces the scale of its target to one, since a container is created
whatever the project says, but the warning looked the service up again in
the project and skipped it when declared with `scale: 0` or
`deploy.replicas: 0`. The per-service check now takes the service
itself, and run hands it the copy it actually creates the container
from. create and up keep skipping services scaled to zero.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
uid, gid and mode on a service-level configs:/secrets: reference are applied
when the object is copied into the container (content: and environment:
sources) and dropped when it is bind-mounted (file: sources). That is a
property of how the container is created, not of the compose file, and an
engine able to set ownership on bind mounts would change the answer.
Report them from create(), next to the other creation-time warnings, once
per requested service, instead of from the load-time unsupported-attribute
check. The false positive on inline and environment sources goes away
without post-filtering findings against the loaded project.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Add TestImagesBackendWiring: the images tests now run against their own fake
backend, so nothing checked that the adapter follows the service's concurrency
bound and the negotiated API version.
Comments only otherwise: say why Backend is narrow rather than embedding
engine.Backend, cross-reference the API version constants declared in both
packages, name down instead of the pkg/compose symbols, point provider_images
to LocalContentDigest, document Summarize, and use the Pruner and PruneOptions
names.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Move the images command, the identity of a local image and the removal of
project images out of pkg/compose into internal/images, behind a small
Backend interface. composeService keeps one-line forwarders so its callers
(build, pull, down, watch) don't change, and ImagePruner, ImagePruneOptions
and NewImagePruner stay exported as aliases.
No behavior change.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
The e2e job installed Docker through get-docker.sh, which resolves
packages from the distribution's apt repository. ubuntu-latest moved to
26.04, whose repository has no Docker 28, so the oldstable rows could
no longer install their engine.
Install it with docker/setup-docker-action instead, with binaries that
do not depend on the distribution: stable follows the latest release,
oldstable follows the 28 image tag. The action starts its engine on its
own socket, selected with set-host, so the e2e framework now forwards
DOCKER_HOST, and TestBuildTLS clears it to keep reaching its dind
builder.
Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
newMonitorTestFixtureListing still returned the unexported monitor type
that moved to internal/logstream, so the compose package tests no longer
compiled. Return *logstream.Monitor like its sibling fixture,
newMonitorTestFixture.
Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
The rebuild forces the recreation of the service it rebuilds and leaves the
providers alone, and the test passed without either option. Give it an up to
date container of the rebuilt service, expected to be removed and created
anyway, and a provider-backed service depending on it, whose provider must not
run.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Merge inspectOf into inspectResultOf (extra healthcheck parameter), add a
container carrying the hook label to the wait fixture the comment talks about,
and drop the executor test map that was written and never read.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
The watch rebuild test recorded every touch alike, so a create alone satisfied
it: record the starts apart and require them for the rebuilt service and the
one depending on it. Scale asked for the project's default replica count, which
made applying the requested count invisible: ask for 2 and count the calls.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
A relay is also started, and onContainerStart adds a watched container to the
set on its own: send the start event too, so that dropping its IsRelay guard
is caught (a relay restarted after having been created before the monitor
subscribed would be waited for forever).
Also use naming.LabelFilter, which labelFilter became on main.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Close the started channel before the start event is emitted, so that a late
starter stopped in reaction to it always finds the container started, and
close both ends of the pipe the hook logs test hands to the session.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Pin that restart waits for a restart:true dependency to hold its condition
again before restarting its dependent, and that its timeout reaches the
daemon in whole seconds.
Part of #14081.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Extend the interactive-up daemon fake and pin the behaviors mutation checks
of the interactive-up switchover found unlocked: the monitor's Services
scope, a Start-phase error while terminated, the cleanup when attaching
fails, signal handling starting only after the Create phase, late starters
stopped after the teardown sweep, hook logs reaching the session, the wait
timeout translation, --exit-code-from and the Running events. Add the
wiring of detached up (with its --wait verification), scale, the rebuild of
watch and the dependencies of run onto the plan.
Part of #14081.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Pin that every ContainerStart holds startMx, that the start, pre_start,
post_start and hook-runner nodes do nothing once the context is canceled,
that a failure relays untouched down a replica's chain, that the node
bookkeeping records cancellations as failures, that the phase returns the
originating error, that an invalid plan is refused, that a concurrency cap
cannot deadlock the node goroutines, that Starting is reported when the
container starts (not during pre_start), that the hook runner targets the
lowest-numbered replica, and that stop timeouts reach the daemon in whole
seconds.
Part of #14081.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Pin which dependencies are worth a wait (shouldWaitForDependency), how each
container state reads for service_healthy and
service_completed_successfully (required and optional, dry-run), the
Waiting/Healthy rows of a wait outside a plan, and that the end of a wait's
context wins over a ready tick. Add the plan shapes for a wait following its
dependency's start, a project of scale: 0 services, and the Start phase
covering every service of the project (the current behavior of scale, whose
change would be a decision of its own).
Part of #14081.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Pin what compose start does around its plan: the --wait verification (ready
or not, timeout message, one-shot services satisfied by their completion),
the project rebuilt from the project's non-one-off containers when no
compose file is given, only the selected services started, and the replicas
started in numeric order.
Part of #14081.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
The monitor ends with the application it follows: pin that its initial
listing and its event subscription are scoped to the project's own
containers (no one-offs, no hook runners without a config hash), and that a
provider's relay, which never terminates, is not waited for, whether it is
there at the start or created later.
Part of #14081.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
logs, attach, the container event monitor they follow and the log
printer move to internal/logstream. The package declares what it needs
from the engine as a small Backend interface; composeService implements
it and keeps one-line forwarders, so `up` and the other callers are
unchanged. Behavior is unchanged: the tests that exercise the moved code
keep their assertions.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
TestStartAlreadyRunning, TestStopAlreadyStopped, TestStartStopMultipleServices
and TestStartStopMultipleFiles now state their intent and observe container
state (running/exited, not recreated) instead of matching progress lines.
The shared fixtures/start-stop had no other user and is removed.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
State what the test locks (a missing env_file only breaks the commands that
need the service referencing it) as a sequence of steps, and observe the
containers (running, scaled, not created) rather than only exit codes.
Completion is covered in both plugin and standalone modes through CompleteCmd.
The fixtures/env_file directory had no other user and is removed.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Express the intent (events refuses a service outside the project) with the
Scenario DSL; the project now lives in testdata/TestEventsUnknownService.
The shared fixtures/simple-composefile is still used by another test.
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>