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 1877534: use --attach instead of --no-attach #2890

Merged
merged 4 commits into from Feb 1, 2024
Merged

bug 1877534: use --attach instead of --no-attach #2890

merged 4 commits into from Feb 1, 2024

Conversation

relud
Copy link
Member

@relud relud commented Feb 1, 2024

No description provided.

@relud relud requested a review from willkg February 1, 2024 16:37
@relud relud requested a review from a team as a code owner February 1, 2024 16:37
@willkg
Copy link
Collaborator

willkg commented Feb 1, 2024

I don't understand what my problem is. This morning, I switched to the docker packages that Ubuntu 23.10 has, so theoretically, I've got what you've got.

$ docker version
Client: Docker Engine - Community
 Version:           24.0.5
 API version:       1.43
 Go version:        go1.20.6
 Git commit:        ced0996
 Built:             Fri Jul 21 20:35:24 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.5
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.6
  Git commit:       a61e2b4
  Built:            Fri Jul 21 20:35:24 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.21
  GitCommit:        3dce8eb055cbb6872793272b4f20ed16117344f8
 runc:
  Version:          1.1.7
  GitCommit:        v1.1.7-0-g860f061
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

With these changes, when I do these steps:

  1. docker compose stop to stop all containers
  2. ./slick.sh to start backing services and set things up
  3. make run

I get this output:

$ make run
/usr/bin/docker compose up \
	--attach-dependencies=false \
	web frontend fakesentry
[+] Running 9/0
 ✔ Container tecken-fakesentry-1    Running                                                                                                                                                                                                                                0.0s 
 ✔ Container tecken-frontend-1      Created                                                                                                                                                                                                                                0.0s 
 ✔ Container tecken-db-1            Running                                                                                                                                                                                                                                0.0s 
 ✔ Container tecken-gcs-emulator-1  Running                                                                                                                                                                                                                                0.0s 
 ✔ Container tecken-statsd-1        Running                                                                                                                                                                                                                                0.0s 
 ✔ Container tecken-localstack-1    Running                                                                                                                                                                                                                                0.0s 
 ✔ Container tecken-redis-cache-1   Running                                                                                                                                                                                                                                0.0s 
 ✔ Container tecken-oidcprovider-1  Running                                                                                                                                                                                                                                0.0s 
 ✔ Container tecken-web-1           Created                                                                                                                                                                                                                                0.0s 
Attaching to tecken-db-1, tecken-fakesentry-1, tecken-frontend-1, tecken-gcs-emulator-1, tecken-localstack-1, tecken-oidcprovider-1, tecken-redis-cache-1, tecken-statsd-1, tecken-web-1
tecken-gcs-emulator-1  | time=2024-02-01T19:12:07.973Z level=INFO msg="127.0.0.1 - - [01/Feb/2024:19:12:07 +0000] \"GET /storage/v1/b HTTP/1.1\" 200 286\n"
tecken-frontend-1      | yarn run v1.22.19
tecken-db-1            | 2024-02-01 19:12:08.360 UTC [239] FATAL:  role "root" does not exist
tecken-frontend-1      | $ react-scripts start
tecken-oidcprovider-1  | [01/Feb/2024 19:12:08] "GET / HTTP/1.1" 200 1830
tecken-statsd-1        | 2024/02/01 19:12:08 [I] Completed 127.0.0.1 - "GET / HTTP/1.0" 302 Found 29 bytes in 206us
tecken-web-1           | web.1 started (pid=10)
tecken-web-1           | disk_manager.1 started (pid=12)
tecken-web-1           | GUNICORN_WORKERS=4
tecken-web-1           | GUNICORN_TIMEOUT=60
tecken-web-1           | PORT=8000
tecken-gcs-emulator-1  | time=2024-02-01T19:12:09.036Z level=INFO msg="127.0.0.1 - - [01/Feb/2024:19:12:09 +0000] \"GET /storage/v1/b HTTP/1.1\" 200 286\n"
tecken-web-1           | [2024-02-01 19:12:09 +0000] [16] [INFO] Starting gunicorn 21.2.0
tecken-web-1           | [2024-02-01 19:12:09 +0000] [16] [INFO] Listening at: http://0.0.0.0:8000 (16)
tecken-web-1           | [2024-02-01 19:12:09 +0000] [16] [INFO] Using worker: sync
tecken-web-1           | [2024-02-01 19:12:09 +0000] [19] [INFO] Booting worker with pid: 19
tecken-web-1           | [2024-02-01 19:12:09 +0000] [21] [INFO] Booting worker with pid: 21
tecken-web-1           | [2024-02-01 19:12:09 +0000] [22] [INFO] Booting worker with pid: 22
tecken-web-1           | [2024-02-01 19:12:09 +0000] [23] [INFO] Booting worker with pid: 23
tecken-db-1            | 2024-02-01 19:12:09.434 UTC [246] FATAL:  role "root" does not exist
tecken-web-1           | WARNING 2024-02-01 19:12:09,541 - webapp - tecken Auth0 blocked check disabled
tecken-web-1           | WARNING 2024-02-01 19:12:09,541 - webapp - tecken Auth0 blocked check disabled
tecken-web-1           | WARNING 2024-02-01 19:12:09,591 - webapp - tecken Auth0 blocked check disabled
tecken-web-1           | WARNING 2024-02-01 19:12:09,607 - webapp - tecken Auth0 blocked check disabled
tecken-frontend-1      | ℹ 「wds」: Project is running at http://172.21.0.9/
tecken-frontend-1      | ℹ 「wds」: webpack output is served from 
tecken-frontend-1      | ℹ 「wds」: Content not from webpack is served from /app/public
tecken-frontend-1      | ℹ 「wds」: 404s will fallback to /
tecken-frontend-1      | Starting the development server...
tecken-frontend-1      | 
tecken-frontend-1      | 
tecken-statsd-1        | 2024/02/01 19:12:09 [I] Completed 127.0.0.1 - "GET / HTTP/1.0" 302 Found 29 bytes in 169us
...

With lots of output from db, statsd, etc. It's clearly attaching to those backing services. I don't understand why docker compose isn't treating them as dependencies.

The --no-attach thing works, but this doesn't.

@willkg
Copy link
Collaborator

willkg commented Feb 1, 2024

I read through the attach/no-attach code PRs:

docker/compose#10137

I tried specifying it the other way and that also works:

${DC} up \
    --attach web \
    --attach frontend \
    --attach fakesentry \
    web frontend fakesentry

Can we switch it to this?

Makefile Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
@relud
Copy link
Member Author

relud commented Feb 1, 2024

Can we switch it to this?

yeah that's fine, code changed

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Copy link
Collaborator

@willkg willkg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! We can use this same method on the other repositories. I can get to it tomorrow if no one else beats me to it.

@relud relud merged commit 9e2449d into main Feb 1, 2024
1 check passed
@relud relud deleted the no-attach branch February 1, 2024 21:12
@relud relud changed the title bug 1877534: use --attach-dependencies=false instead of --no-attach bug 1877534: use --attach instead of --no-attach Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants