Skip to content

compose v2 not sending meaningful user agent string #8901

Description

@thespad

Description

When sending a pull request to a registry docker-compose 1.x will send a user agent which includes something like UpstreamClient(docker-compose/1.29.2 docker-py/5.0.0 Linux/5.4.0-88-generic) clearly identifying that the client is docker-compose and what its version is. Compose 2.x appears to send a generic user agent in the form UpstreamClient(Docker-Client/unknown-version \(linux\)).

Steps to reproduce the issue:

  1. User docker compose v2 to pull from a registry you control
  2. Observe the user agent sent with the request

Describe the results you received:
A user agent string of docker/20.10.9 go/go1.16.8 git-commit/79ea9d3 kernel/5.4.0-77-generic os/linux arch/amd64 UpstreamClient(Docker-Client/unknown-version \(linux\))

Describe the results you expected:
A user agent string with specific client and version information in keeping with the 1.x behaviour

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker compose version:

Docker Compose version v2.1.0

Output of docker info:

Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Build with BuildKit (Docker Inc., v0.6.3-docker)
compose: Docker Compose (Docker Inc., v2.1.0)
scan: Docker Scan (Docker Inc., v0.8.0)
Server:
Containers: 56
Running: 56
Paused: 0
Stopped: 0
Images: 59
Server Version: 20.10.9
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 5b46e404f6b9f661a205e28d59c982d3634148f8
runc version: v1.0.2-0-g52b36a2
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 5.4.0-77-generic
Operating System: Ubuntu 20.04.3 LTS
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.64GiB
Name: docker2
ID: 67LS:QX2S:7P4H:CTCH:IGKD:4BKW:6HYY:46PB:LHNR:IXBV:CDSP:FXXJ
Docker Root Dir: /var/lib/docker
Debug Mode: false
Username: thespad
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: No swap limit support

Additional environment details:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions