-
Notifications
You must be signed in to change notification settings - Fork 809
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
fix docker compose tests #5479
fix docker compose tests #5479
Changes from all commits
2865303
d75b2ec
07e6515
9641a99
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,11 @@ services: | |
services-network: | ||
aliases: | ||
- cassandra | ||
healthcheck: | ||
test: ["CMD", "cqlsh", "-u cassandra", "-p cassandra" ,"-e describe keyspaces"] | ||
interval: 15s | ||
timeout: 30s | ||
retries: 10 | ||
|
||
mysql: | ||
image: mysql:8.0 | ||
|
@@ -86,8 +91,9 @@ services: | |
build: | ||
context: ../../ | ||
dockerfile: ./docker/buildkite/Dockerfile | ||
command: make cover_profile | ||
command: sh -c "make .just-build && make install-schema && make cover_profile" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. poking at this locally, I kinda think we don't want There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not the tool that you use to run unit tests. This is a "close to CI" way to simulate what is running on buildkite, so I wanted it to behave as CI run. If it will be needed, we can separate it to an extra step, but it was useful to debug the problem There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suppose in that scenario, people would have to drop cassandra each time? and that's reasonable because it matches CI? which may be reasonable, this is in a buildkite folder after all. it's not a totally general thing. just checking / understanding. |
||
environment: | ||
- "CASSANDRA_HOST=cassandra" | ||
- "CASSANDRA=1" | ||
- "MYSQL=1" | ||
- "POSTGRES=1" | ||
|
@@ -98,12 +104,18 @@ services: | |
- "POSTGRES_USER=cadence" | ||
- "POSTGRES_PASSWORD=cadence" | ||
depends_on: | ||
- cassandra | ||
- mysql | ||
- postgres | ||
- mongo | ||
cassandra: | ||
condition: service_healthy | ||
mysql: | ||
condition: service_started | ||
postgres: | ||
condition: service_started | ||
mongo: | ||
condition: service_started | ||
volumes: | ||
- ../../:/cadence | ||
- /cadence/.build/ # ensure we don't mount the build directory | ||
- /cadence/.bin/ # ensure we don't mount the bin directory | ||
networks: | ||
services-network: | ||
aliases: | ||
|
@@ -115,17 +127,23 @@ services: | |
dockerfile: ./docker/buildkite/Dockerfile | ||
command: make cover_integration_profile | ||
environment: | ||
- "CASSANDRA_HOST=cassandra" | ||
- "CASSANDRA=1" | ||
- "CASSANDRA_SEEDS=cassandra" | ||
- "ES_SEEDS=elasticsearch" | ||
- "KAFKA_SEEDS=kafka" | ||
- "TEST_TAG=esintegration" | ||
depends_on: | ||
- cassandra | ||
- elasticsearch | ||
- kafka | ||
cassandra: | ||
condition: service_healthy | ||
elasticsearch: | ||
condition: service_started | ||
kafka: | ||
condition: service_started | ||
volumes: | ||
- ../../:/cadence | ||
- /cadence/.build/ # ensure we don't mount the build directory | ||
- /cadence/.bin/ # ensure we don't mount the bin directory | ||
Comment on lines
+145
to
+146
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does this.... hide the out-of-docker hiding seems useful and if that's all this does it's nice and simple, though we probably also want to hide the binaries to be a bit more complete (it'll influence build, and arch may be different) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah, TIL "anonymous volumes". so it sounds like this does reuse them between runs. might be useful? it'll save re-downloading stuff, which is likely good. assuming the .build / .bin dirty-detection is good enough anyway, otherwise people will also have to know to delete these volumes... if we really want this all to run quickly on local, we can also mount the GOPATH/pkg/mod folder, since that's platform-agnostic and accounts for the vast majority of the downloads. I'm not sure how to make use of that in buildkite tho. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It not only rebuild stuff, it reruns generate, goimports, copyright. So no point on that. |
||
networks: | ||
services-network: | ||
aliases: | ||
|
@@ -149,6 +167,8 @@ services: | |
- kafka | ||
volumes: | ||
- ../../:/cadence | ||
- /cadence/.build/ # ensure we don't mount the build directory | ||
- /cadence/.bin/ # ensure we don't mount the bin directory | ||
networks: | ||
services-network: | ||
aliases: | ||
|
@@ -173,6 +193,8 @@ services: | |
- kafka | ||
volumes: | ||
- ../../:/cadence | ||
- /cadence/.build/ # ensure we don't mount the build directory | ||
- /cadence/.bin/ # ensure we don't mount the bin directory | ||
networks: | ||
services-network: | ||
aliases: | ||
|
@@ -184,17 +206,23 @@ services: | |
dockerfile: ./docker/buildkite/Dockerfile | ||
command: make cover_integration_profile EVENTSV2=true | ||
environment: | ||
- "CASSANDRA_HOST=cassandra" | ||
- "CASSANDRA=1" | ||
- "CASSANDRA_SEEDS=cassandra" | ||
- "ES_SEEDS=elasticsearch" | ||
- "KAFKA_SEEDS=kafka" | ||
- "TEST_TAG=esintegration" | ||
depends_on: | ||
- cassandra | ||
- elasticsearch | ||
- kafka | ||
cassandra: | ||
condition: service_healthy | ||
elasticsearch: | ||
condition: service_started | ||
kafka: | ||
condition: service_started | ||
volumes: | ||
- ../../:/cadence | ||
- /cadence/.build/ # ensure we don't mount the build directory | ||
- /cadence/.bin/ # ensure we don't mount the bin directory | ||
networks: | ||
services-network: | ||
aliases: | ||
|
@@ -206,17 +234,23 @@ services: | |
dockerfile: ./docker/buildkite/Dockerfile | ||
command: make cover_ndc_profile | ||
environment: | ||
- "CASSANDRA_HOST=cassandra" | ||
- "CASSANDRA=1" | ||
- "CASSANDRA_SEEDS=cassandra" | ||
- "ES_SEEDS=elasticsearch" | ||
- "KAFKA_SEEDS=kafka" | ||
- "TEST_TAG=esintegration" | ||
depends_on: | ||
- cassandra | ||
- elasticsearch | ||
- kafka | ||
cassandra: | ||
condition: service_healthy | ||
elasticsearch: | ||
condition: service_started | ||
kafka: | ||
condition: service_started | ||
volumes: | ||
- ../../:/cadence | ||
- /cadence/.build/ # ensure we don't mount the build directory | ||
- /cadence/.bin/ # ensure we don't mount the bin directory | ||
networks: | ||
services-network: | ||
aliases: | ||
|
@@ -240,6 +274,8 @@ services: | |
- kafka | ||
volumes: | ||
- ../../:/cadence | ||
- /cadence/.build/ # ensure we don't mount the build directory | ||
- /cadence/.bin/ # ensure we don't mount the bin directory | ||
networks: | ||
services-network: | ||
aliases: | ||
|
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.
bins
may be excessive, but this is broadly useful to ensure it builds before running all tests. otherwise it can get like 90% of the way through before failing on a syntax error or partial-refactor or something.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.
We have a separate job that generates bins and verifies copyright and etc. If something is broken, I expect tests to fail. In this case bins generation/verification takes a lot of time.
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.
yea, fair. I suppose this is really only intended for CI, most people should be using
make cover
instead?