Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] watch: can't watch a service without a build section #10270

Closed
nocive opened this issue Feb 12, 2023 · 3 comments · Fixed by #10271
Closed

[BUG] watch: can't watch a service without a build section #10270

nocive opened this issue Feb 12, 2023 · 3 comments · Fixed by #10271
Assignees
Labels

Comments

@nocive
Copy link

nocive commented Feb 12, 2023

Description

I understand the watch feature is still very much experimental and being worked on, however I wanted to get a feel on how I could leverage it in the future.

I have a big docker compose project (100+ containers) some of them with build context, some of them without.
No matter how I run the docker compose alpha watch command I always get the error:

can't watch a service without a build section

I get this message even when the target service has a build section, I can only guess it's complaining about the dependencies of said service, which feels like a bug.

Would it be possible and make sense to ignore/skip services which do not have a build section instead of erroring out?

Steps To Reproduce

Project too big to share and I didn't have the time to isolate the problem, sorry 😶

I can try to get a reproduction scenario up once I have the time, but I'm assuming this bug report should be fairly obvious to @ndeloof without further information here :)

Compose Version

Docker Compose version v2.16.0

Docker Environment

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.9.1)
  compose: Docker Compose (Docker Inc., v2.16.0)
  scan: Docker Scan (Docker Inc., v0.1.0-227-g061fe0a0c5)

Server:
 Containers: 328
  Running: 2
  Paused: 0
  Stopped: 326
 Images: 396
 Server Version: 20.10.20
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: false
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 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: runc io.containerd.runc.v2 io.containerd.runtime.v1.linux
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 96df0994faabc1944fc614e52b0b3c6feb609a57.m
 runc version: 
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
  cgroupns
 Kernel Version: 5.18.1-arch1-1
 Operating System: xxx
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 15.49GiB
 Name: xxx
 ID: xxx
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: xxx
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: true
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Anything else?

No response

@ndeloof
Copy link
Contributor

ndeloof commented Feb 13, 2023

You should run docker compose alpha watch SERVICES... with the service(s) you are currently developing.
But I agree, for convenience, services with no build section should just be ignored until explicitly selected by user. Same for service dependencies.

@ndeloof
Copy link
Contributor

ndeloof commented Feb 13, 2023

Thanks a lot for testing watch command and giving us feedback ;)

@nocive
Copy link
Author

nocive commented Feb 13, 2023

@ndeloof np, glad I could help somehow ;)

Regarding #10270 (comment), for clarification:

I still get the same error, even when invoking with a specific service name which contains a build section. That service does however depends on other services which do not have a build section, so I assume the error occurs due to dependency resolving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants