chore(tests): Update test files to work with Docker Compose v2 #82
Merged
deadlycoconuts merged 8 commits intocaraml-dev:mainfrom Aug 8, 2024
Merged
Conversation
7d2126f to
6968153
Compare
a824d88 to
b7c0e05
Compare
c271687 to
ee92679
Compare
ee92679 to
58774a4
Compare
deadlycoconuts
commented
Aug 7, 2024
deadlycoconuts
commented
Aug 7, 2024
deadlycoconuts
commented
Aug 7, 2024
treatment-service/integration-test/docker-compose/kafka/docker-compose.yaml
Show resolved
Hide resolved
tiopramayudi
reviewed
Aug 8, 2024
Collaborator
tiopramayudi
left a comment
There was a problem hiding this comment.
Add some comments, the rest is LGTM! Thanks @deadlycoconuts
tiopramayudi
approved these changes
Aug 8, 2024
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.
What this PR does / why we need it:
It seems like v1 of Docker Compose has just been removed from all ubuntu GitHub runners as of the 29th of July (and has been ongoing since that day). This has broken the CICD pipelines of lots of repos (just take a look at the number of times that issue has been referenced), including XP. As such we can no longer run commands like
docker-composein the GitHub runners anymore and need to start updating them to use the v2 commands (todocker composefor this particular example).For XP in particular, what broke were the Treatment Service integration tests, where we were using the
testcontainerspackage to spin up Kafka. This version however, is also similarly super old, and callsdocker-compose(v1) to spin containers in Go code. As such, this PR updates the version oftestcontainers(which also requires some additional changes to the methods we need to call) so that the Docker Compose v2 commands are used instead.Summary of Changes:
docker-composetodocker composetestcontainersversiontestcontainers)go mod tidyin all placesio/ioutilpackage methods withiomethods (this mostly applied to the autogenerated code inclients/management/managementclient.goandclients/treatment/treatmentclient.go; I could've regenerated the code with a newer version of the code generator but I just decided to use my IDE to replace them)treatment-service/integration-test/fetch_treatment_it_test.goto use the new Docker Compose v2 commandstreatment-service/models/storage_test.goto ensure that an existing unit test no longer breaks because it's performing a check on a randomly generated IDWhich issue(s) this PR fixes:
Fixes #