Skip to content

Conversation

dgoffredo
Copy link
Contributor

I was working on a side project last weekend that had me running make test on my personal laptop. It failed.

The reason was that docker-compose on that laptop prefixes messages like "Creating container [...] ..." with a space, so it's " Creating container [...] ...". orchestration.py was thus failing to recognize such lines and indicating that a container was created, and so the test driver was spinning forever waiting for things to come up.

This revision fixes that by adding the prefix \s* to all relevant regex patterns.

Another issue was how docker-compose ps works. The tests were written to expect that when docker-compose ps <service> has nothing to say, then the command will exit with a nonzero status. On my personal laptop, this is not true. So, now we wait for the condition "nonzero exit status and nonempty output." Five retries is no longer enough, so I increased it to 100.

Finally, I changed all mentions of docker-compose to be instead docker compose. They are different, though on CircleCI I think that docker-compose was just a wrapper that forwarded to docker compose. The original Python docker-compose is completely replaced by Docker's "compose" plugin (docker compose, written in Go).

The tests now pass on my personal laptop. Let's see what CircleCI thinks of these changes.

@dgoffredo dgoffredo requested a review from cgilmour August 17, 2023 00:00
Copy link

@cgilmour cgilmour left a comment

Choose a reason for hiding this comment

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

This looked like it's mostly s/docker-compose/docker compose

@cgilmour
Copy link

You might need to rebase and sign the commits to make it mergeable

@dgoffredo dgoffredo force-pushed the david.goffredo/portability-of-tests branch from 6db1bee to bcd8088 Compare August 21, 2023 10:18
@dgoffredo
Copy link
Contributor Author

thanks, Caleb

@dgoffredo dgoffredo merged commit 12b690e into master Aug 21, 2023
@dgoffredo dgoffredo deleted the david.goffredo/portability-of-tests branch August 21, 2023 10:23
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.

2 participants