Conversation
5c4dcaf to
25e9114
Compare
|
Here's the output for pgrep on a runner at the parallel tests launch: Now, we'll have all the |
azat
left a comment
There was a problem hiding this comment.
Killer feature!
P.S. why does it have changes for Kafka here?
| os.makedirs(p.dirname(self.docker_logs_path), exist_ok=True) | ||
| # Here errors='replace' because docker can sometimes write non-unicode characters to its output. | ||
| docker_logs_path = open(self.docker_logs_path, "w+", errors="replace") | ||
| subprocess.Popen( |
There was a problem hiding this comment.
Should we kill this process properly as well?
There was a problem hiding this comment.
No, the docker compose logs --follow dies with exit code 0 when the compose services finish:
> docker compose up -d
[+] Running 5/5
✔ Container graphite-clickhouse-tldr-carbon-clickhouse-1 Started 0.5s
✔ Container graphite-clickhouse-tldr-carbonapi-1 Started 0.4s
✔ Container graphite-clickhouse-tldr-clickhouse-1 Started 0.5s
✔ Container graphite-clickhouse-tldr-grafana-1 Started 0.4s
✔ Container graphite-clickhouse-tldr-graphite-clickhouse-1 Started 0.5s
> docker compose logs -f &> docker.logs &
[1] 2323019
> docker compose stop
[+] Stopping 5/5
✔ Container graphite-clickhouse-tldr-grafana-1 Stopped 0.4s
✔ Container graphite-clickhouse-tldr-clickhouse-1 Stopped 2.5s
✔ Container graphite-clickhouse-tldr-carbonapi-1 Stopped 0.3s
✔ Container graphite-clickhouse-tldr-graphite-clickhouse-1 Stopped 0.4s
✔ Container graphite-clickhouse-tldr-carbon-clickhouse-1 Stopped 0.5s
[1] + done docker compose logs -f &> docker.logs
> tail -5 docker.logs
carbonapi-1 exited with code 0
grafana-1 exited with code 0
graphite-clickhouse-1 exited with code 0
carbon-clickhouse-1 exited with code 1
clickhouse-1 exited with code 0
There was a problem hiding this comment.
I know, but still looks odd, not to wait the process properly
There was a problem hiding this comment.
We shouldn't wait for it, that's the case.
It's a background process writing the logs in realtime.
And it's killed on it's own, when the tests' docker compose is finished
There was a problem hiding this comment.
We shouldn't wait for it, that's the case.
This is minor, in terms of the behavior, but leaving processes without waiting is bad
For instance it could be the case that docker-compose has some buffering for logs and without properly waiting for it we cannot be sure that everything is dumped
There was a problem hiding this comment.
I see. Yeah, we can wait for it in shutdown
|
You know, I'd really move splitting kafka tests into the different PR #76208 |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Do not collect the
docker-composelogs at the end of running since the script is often killed. Instead, collect them in the background.Documentation entry for user-facing changes