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

Docker setup for localtests #1479

Merged
merged 2 commits into from
Dec 13, 2024
Merged

Docker setup for localtests #1479

merged 2 commits into from
Dec 13, 2024

Conversation

meiji163
Copy link
Contributor

@meiji163 meiji163 commented Dec 13, 2024

Description

This PR adds a docker container setup for running the replica tests in localtest/, since it can be hard to get dbdeployer working locally, and it is no longer maintained. Eventually we can use docker for the replica tests in CI as well.
Tested with mysql:8.0.39 on darwin arm64 and linux amd64.

Usage:

docker-gh-ost-replica-tests up # bring containers up
docker-gh-ost-replica-tests run # run localtests
docker-gh-ost-replica-tests down # remove containers
TEST_MYSQL_IMAGE="mysql:8.0.16" docker-gh-ost-replica-tests up # change the mysql image

In case this PR introduced Go code changes:

  • contributed code is using same conventions as original code
  • script/cibuild returns with no formatting errors, build errors or unit test errors.

@Copilot Copilot bot review requested due to automatic review settings December 13, 2024 03:53

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 6 changed files in this pull request and generated no comments.

Files not reviewed (4)
  • localtests/test.sh: Language not supported
  • script/docker-gh-ost-replica-tests: Language not supported
  • script/gh-ost-test-mysql-master: Language not supported
  • script/gh-ost-test-mysql-replica: Language not supported
Comments suppressed due to low confidence (3)

localtests/docker-compose.yml:3

  • The environment variable TEST_MYSQL_IMAGE is not defined within the docker-compose file. Ensure that this variable is set in the environment where the docker-compose command is run.
image: $TEST_MYSQL_IMAGE

localtests/docker-compose.yml:11

  • The MySQL container is configured to use port 3307, which is non-standard and may conflict with other services. Ensure this port is available or consider using the default MySQL port 3306.
- '3307:3307'

localtests/docker-compose.yml:23

  • The MySQL replica container is configured to use port 3308, which is non-standard and may conflict with other services. Ensure this port is available or consider using the default MySQL port 3306.
- '3308:3308'

Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more

@meiji163 meiji163 merged commit dbd3d71 into master Dec 13, 2024
7 checks passed
@meiji163 meiji163 deleted the meiji163/docker-local-test branch December 13, 2024 19:59
@ghost

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants