[8.19](backport #46562) refactor: remove obsolete "version" property from Docker Compose files
As specified here:
- https://docs.docker.com/reference/compose-file/version-and-name/#version-top-level-element-obsolete
- https://github.com/compose-spec/compose-spec/blob/main/spec.md#version-and-name-top-level-elements
See this comment and issue for more context:
- https://github.com/docker/compose/issues/11628#issuecomment-2075664290
Removing the property gets rid of this warning displayed whenever using the files (e.g. running integration tests):
"the attribute
versionis obsolete, it will be ignored, please remove it to avoid potential confusion".
This is an automatic backport of pull request #46562 done by Mergify.
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)
This pull request has not been merged yet. Could you please review and merge it @andrzej-stencel? 🙏
This pull request has not been merged yet. Could you please review and merge it @andrzej-stencel? 🙏
/test
@pierrehilbert The failures are unrelated, can you force merge?
We should backport https://github.com/elastic/beats/pull/46913 to fix it.
This pull request has not been merged yet. Could you please review and merge it @andrzej-stencel? 🙏
This pull request has not been merged yet. Could you please review and merge it @andrzej-stencel? 🙏
This pull request has not been merged yet. Could you please review and merge it @andrzej-stencel? 🙏
/test
This pull request has not been merged yet. Could you please review and merge it @andrzej-stencel? 🙏
This pull request has not been merged yet. Could you please review and merge it @andrzej-stencel? 🙏
I see the following test failures:
=== FAIL: metricbeat/module/aerospike/namespace TestFetch (186.02s) logger.go:146: 2025-11-17T14:32:30.634Z DEBUG docker Docker client will negotiate the API version on the first request. logger.go:146: 2025-11-17T14:32:30.636Z ERROR container remove: Error response from daemon: Conflict, cannot remove the default link name of the container Found orphan containers (metricbeat_8_19_8_d4a5a26c38-snapshot_etcd_1, metricbeat_8_19_8_d4a5a26c38-snapshot_mysql_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
I'm investigating. Strange that it's not failing the same way on main.
In https://github.com/elastic/beats/pull/46856/commits/938341c731ef9758485bd83992a010c4021cad23 I'm trying out something that docker-compose suggested in its output. If it works, I'll open a PR to main with this change and then backport to all active branches.
https://github.com/elastic/beats/pull/46856#issuecomment-3542657256 – this didn't help and the tests are passing locally on my machine. I suspect it has something to do with the Docker version itself. I'm reverting https://github.com/elastic/beats/pull/46856/commits/938341c731ef9758485bd83992a010c4021cad23
This pull request has not been merged yet. Could you please review and merge it @rdner? 🙏
/test
This pull request has not been merged yet. Could you please review and merge it @rdner? 🙏
This pull request has not been merged yet. Could you please review and merge it @andrzej-stencel? 🙏
This pull request has not been merged yet. Could you please review and merge it @andrzej-stencel? 🙏