ci: Migrate github services to docker compose#2203
Open
thompson-tomo wants to merge 28 commits intoopen-telemetry:mainfrom
Open
ci: Migrate github services to docker compose#2203thompson-tomo wants to merge 28 commits intoopen-telemetry:mainfrom
thompson-tomo wants to merge 28 commits intoopen-telemetry:mainfrom
Conversation
Add healthcheck for RabbitMQ service in Docker Compose
There was a problem hiding this comment.
Pull request overview
This PR migrates instrumentation CI “services” (Redis/MySQL/Postgres/Kafka/etc.) from GitHub Actions services: definitions to the repo’s shared Docker Compose infrastructure, aiming to keep CI/local service configuration consistent and reduce workflow duplication.
Changes:
- Adds per-gem
test/compose.ymlfiles thatincludethe shared.docker/infra/**compose definitions. - Reworks the
ci-instrumentation-with-servicesworkflow to start services viadocker composeper gem directory instead of GitHub Actionsservices:. - Standardizes Redis test configuration to use port
6379across helpers/configs and updates infra compose definitions (healthchecks/ports/volumes).
Show a summary per file
| File | Description |
|---|---|
| instrumentation/trilogy/test/compose.yml | Uses shared MySQL compose for trilogy tests. |
| instrumentation/mysql2/test/compose.yml | Uses shared MySQL compose for mysql2 tests. |
| instrumentation/pg/test/compose.yml | Uses shared Postgres compose for pg tests. |
| instrumentation/que/test/compose.yml | Uses shared Postgres compose for que tests. |
| instrumentation/ruby_kafka/test/compose.yml | Uses shared Kafka compose for ruby_kafka tests. |
| instrumentation/rdkafka/test/compose.yml | Uses shared Kafka compose for rdkafka tests. |
| instrumentation/racecar/test/compose.yml | Uses shared Kafka compose for racecar tests. |
| instrumentation/mongo/test/compose.yml | Uses shared Mongo compose for mongo tests. |
| instrumentation/dalli/test/compose.yml | Uses shared Memcached compose for dalli tests. |
| instrumentation/bunny/test/compose.yml | Uses shared RabbitMQ compose for bunny tests. |
| instrumentation/redis/test/compose.yml | Uses shared Redis compose for redis tests. |
| instrumentation/resque/test/compose.yml | Uses shared Redis compose for resque tests. |
| instrumentation/sidekiq/test/compose.yml | Uses shared Redis compose for sidekiq tests. |
| instrumentation/sidekiq/test/test_helper.rb | Updates default Redis port to 6379. |
| instrumentation/sidekiq/test/redis.conf | Updates Redis config port to 6379. |
| instrumentation/resque/test/test_helper.rb | Updates default Redis port to 6379. |
| instrumentation/resque/test/redis.conf | Updates Redis config port to 6379. |
| instrumentation/redis/test/test_helper.rb | Updates default Redis port to 6379. |
| instrumentation/redis/test/redis.conf | Updates Redis config port to 6379. |
| instrumentation/redis/example/redis.rb | Updates example default Redis port to 6379. |
| .github/workflows/ci-instrumentation-with-services.yml | Consolidates service startup via docker compose per gem matrix entry. |
| .docker/infra/redis/docker-compose.yml | Standardizes Redis port mapping and adds env/healthcheck/volume. |
| .docker/infra/rabbitmq/docker-compose.yml | Adds RabbitMQ healthcheck. |
| .docker/infra/postgres/docker-compose.yml | Adds Postgres healthcheck; changes socket volume mount behavior. |
| .docker/infra/mysql/docker-compose.yml | Adds MySQL healthcheck; normalizes command format. |
| .docker/infra/kafka/docker-compose.yml | Adds healthchecks and tightens Kafka startup dependency on ZooKeeper health. |
| docker-compose.yml | Removes no-longer-needed volumes/tmpfs overrides and relies on included infra definitions. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 27/27 changed files
- Comments generated: 3
Comment on lines
13
to
+14
| volumes: | ||
| - postgres_socket:/var/run/postgresql | ||
| - /var/run/postgresql:/var/run/postgresql |
Contributor
Author
There was a problem hiding this comment.
I tried to do this but there is a socket test which requires this otherwise it would fail.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This moves the github services to be using the common docker infra. By making this change we can ensure that the service is configured in a consistent manner ie ci, local. Note currently some of the tests are unlikely to have passed locally using the included service.
It also helps achieve a drier Workflow as we can now use a single multi service matrix with the CI step deciding what services needs to be started by using the definition in the working directory file tree.
The only change other than merging the service definitions is standardising redis port as previously it was mixed.
The last thing this change does is help with deprecation as we can lock a library to an older version of a service and it could potentially help to resolve our mysql issue blocking our update attempts aka #2044.