-
Notifications
You must be signed in to change notification settings - Fork 175
tools: use docker compose and quiet for pulling when using docker or docker compose #8594
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
base: main
Are you sure you want to change the base?
Conversation
This pull request does not have a backport label. Could you fix it @v1v? 🙏
|
@@ -209,16 +209,6 @@ func dockerInfo() (*DockerInfo, error) { | |||
return &info, nil | |||
} | |||
|
|||
// HaveDockerCompose returns an error if docker-compose is not found on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming docker compose
is available, so by validating docker
I think we can remove this condition. It's not available, it will fail regardless.
…ithub.com/v1v/elastic-agent into feature/remove-verbose-pulling-containers * 'feature/remove-verbose-pulling-containers' of https://github.com/v1v/elastic-agent: Update dev-tools/mage/integtest_docker.go
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I am not in favour of this change as I don't wanna lose the info of which images I pull to build my packages especially since it involves golangcross-build, which has many different variants 🙂
@v1v I am not so sure about reducing the docker logs though, since those have been useful to debug build/packaging issues in the past; removing part of those logs means that in order to investigate issues, those must be reproduced and analyzed off buildkite or with a dedicated PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am skeptical about the use of --quiet
; while I understand the motivation to reduce verbosity related to the individual layers, by making all stdout quiet we are losing previous information about the docker image (e.g. golang crossbuild) that got pulled, thus making troubleshooting unnecessarily harder.
My concern is that those details are too verbose and unstructured; however, I think using I understand your view, probably, we could say if a retry then enable the prior approach, otherwise use However, maybe I'm overthinking, I feel you prefer to do a step back and only make the changes for:
That's something I took from elastic/golang-crossbuild#528 If no objections, I'll remove the |
@@ -294,7 +294,7 @@ func (b GolangCrossBuilder) Build() error { | |||
// container. So we ensure that all path separators are `/`. | |||
buildCmd = filepath.ToSlash(buildCmd) | |||
|
|||
dockerRun := sh.RunCmd("docker", "run") | |||
dockerRun := sh.RunCmd("docker", "run", "--quiet") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the docs:
$ docker run --help
...
--pull string Pull image before running ("always", "missing", "never") (default "missing")
-q, --quiet Suppress the pull output
See https://docs.docker.com/reference/cli/docker/container/run/

@@ -785,7 +785,7 @@ func runFPM(spec PackageSpec, packageType PackageType) error { | |||
} | |||
spec.OutputFile = packageType.AddFileExtension(filepath.Join(distributionsDir, outputFile)) | |||
|
|||
dockerRun := sh.RunCmd("docker", "run") | |||
dockerRun := sh.RunCmd("docker", "run", "--quiet") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again sorry but I don't agree, here you seem to care only for failures, but we would also like to be in the position of looking the docker build for green steps.
Again to understand the purpose of this PR, I am gonna echo the same question of @pchila; What is the impact of those docker logs that we are trying to mitigate/remove? 🙂 |
|
💛 Build succeeded, but was flaky
Failed CI Stepscc @v1v |
It's about ergonomics and usability. Seeing logs regarding an interactive shell is certainly misleading and therefore makes the UI experience really bad - people need to download the log as it's massive. For instance, see https://buildkite.com/elastic/elastic-agent-extended-testing/builds/9082#01978c8c-60aa-4e4a-a0a9-1c61f59e7329/6-7 Then, if you click on open https://buildkite.com/organizations/elastic/pipelines/elastic-agent-extended-testing/builds/9082/jobs/01978c8c-60aa-4e4a-a0a9-1c61f59e7329/log ![]() Maybe, it's me, but having a UI that cannot show relevant details because logs are massive sounds like something to improve. Hence this PR. However, I don't use this CI massively. Probably I'm biased here. If you think the changes are not relevant, I'm happy to change the scope and focus only on the |
What does this PR do?
docker compose
docker compose --progress=plain
(see https://docs.docker.com/reference/cli/docker/compose/)docker run --quiet
(see https://docs.docker.com/reference/cli/docker/container/run)docker build --progress=plain
(see https://docs.docker.com/reference/cli/docker/buildx/build/#options)Why is it important?
See
vs
Checklist
./changelog/fragments
using the changelog toolDisruptive User Impact
How to test this PR locally
CI
Related issues
Questions to ask yourself