14 Commits

Author SHA1 Message Date
David Gageot
093205121c test: replace context.Background()/context.TODO() with t.Context()
Replace manual context creation with t.Context() which is automatically
cancelled when the test completes.

Go 1.24 modernization pattern.

Assisted-By: cagent
Signed-off-by: David Gageot <david.gageot@docker.com>
2026-01-20 11:34:11 +01:00
Sebastiaan van Stijn
dc66e6bad1 golangci-lint: use gci formatter instead of goimports
Most files already grouped imports into "stdlib -> other -> local",
but some files didn't. The gci formatter is similar to goimports, but
has better options to make sure imports are grouped in the expected
order (and to make sure no additional groups are present).

This formatter has a 'fix' function, so code can be re-formatted auto-
matically;

    golangci-lint run -v --fix

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-01 12:21:50 +01:00
Nicolas De Loof
2b4543935c next release will be major version v5.x
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2025-11-13 09:32:43 +01:00
Nicolas De Loof
e25265dd55 remove unused code to only rely on api.Service
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2025-10-20 14:53:04 +02:00
Guillaume Lours
f5491328bb remove support of Synchronize File Shares integration with Docker Desktop
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-04-22 15:29:23 +02:00
Adel Sevastianov
846161d447 Fix linting issue with resp.Body.Close()
Signed-off-by: Adel Sevastianov <102406080+Saracomethstein@users.noreply.github.com>
2025-04-09 15:25:53 +02:00
Adel Sevastianov
0bcc629fbe refactor: improve Desktop client structure
Signed-off-by: Adel Sevastianov <102406080+Saracomethstein@users.noreply.github.com>
2025-04-09 15:25:53 +02:00
David Scott
38e3d670a9 desktop: allow this client to be identified via user-agent
Previously the HTTP requests were sent with a generic Go-http-client
user-agent which made it hard to determine where the requests are
coming from. It's important that we can find clients so that they
can be updated if APIs change in future.

Signed-off-by: David Scott <dave@recoil.org>
2024-10-15 13:59:49 +02:00
Alexandr Hacicheant
16652ed26a Fixed possible nil pointer dereference
Signed-off-by: Alexandr Hacicheant <a.hacicheant@gmail.com>
2024-09-13 22:10:35 +02:00
Nicolas De Loof
b3792dd258 progress for resource can be restarted after more Working event comes
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-04-15 22:05:46 +02:00
Milas Bowman
3371227794 chore(desktop): revised feature detection for file shares
Unfortunately, the feature flag mechanism for experimental features
isn't adequate. To avoid some edge cases where Compose might try to
use Synchronized file shares with Desktop when the feature isn't
available, we need to query a new endpoint.

Before we move any of this out of experimental, we need to improve
the integration here with Desktop & Compose so that we get all the
necessary feature/experiment state up-front to reduce the quantity
of IPC calls needed up-front.

For now, there's some intentional redundancy to avoid making this
extra call if we can avoid it. The actual endpoint is very cheap/
fast, but every IPC call is a potential point of of failure, so
it's worth it.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2024-03-22 18:16:27 +01:00
Milas Bowman
db4ed89528 feat(desktop): synchronized file share integration (#11614) 2024-03-20 14:41:24 -04:00
Milas Bowman
1b5fa3b93f feat(experiments): add experimental feature state (#11633)
Use environment variable for global opt-out and Docker Desktop (if
available) to determine specific experiment states.

In the future, we'll allow per-feature opt-in/opt-out via env vars
as well, but currently there is a single `COMPOSE_EXPERIMENTAL` env
var that can be used to opt-out of all experimental features
independently of Docker Desktop configuration.
2024-03-20 13:44:27 +00:00
Milas Bowman
17d4229e57 feat(desktop): add Docker Desktop detection and client skeleton (#11593) 2024-03-12 09:47:41 -04:00