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

Newer docker version #1419

Merged
merged 10 commits into from
Jun 17, 2024
Merged

Newer docker version #1419

merged 10 commits into from
Jun 17, 2024

Conversation

aequitas
Copy link
Collaborator

@aequitas aequitas commented May 29, 2024

This PR fixes several issues with newer Docker/Compose versions:

  • Compose version 2.24 and later have changed the way network configurations are merged when using multiple compose files (like in integration tests). Instead of overriding the network config it is now merged. By specifying !override in the YAML file explicitly we get the expected behaviour on newer version which is backwards compatible with older versions as well.
  • Docker versions between 25.0.5 and 26.1.2 have issues with internal DNS resolving using the mock resolver. There is no practical workaround for this so these versions should be avoided, this is documented and will be checked by the test runner before starting tests.
  • Chromium does not support IPv6 resolving (at all, not even local!) if it fails an global IPv6 connectivity check (which requires internet, in an isolated environment), causing a few tests (ipv6.internet.nl domains and the connection test) to fail. Switching to Firefox as browser used for testing. There might be a way to override this behaviour in Chrome using the IPv6ReachabilityOverrideEnabled policy, but so far I have not been able to make it work inside the playwright Docker image using available documentation. Firefox does seem a little bit slower on executing the tests so we might want to switch back to Chrome if we can.
  • Docker Compose 2.24 broke the way .env files were handled (error: no configuration file provided: not found). This has been fixed in 2.27.0 but seems to be broken again in 2.27.1 due to [BUG] Incompatible .env file behavior docker/compose#11880. Currently Compose in CI will be pinned to 2.27.0.

Besides the fixes the following changes are included:

  • Compatible versions have been documented.
  • Compatible Docker versions are checked before running tests to warn the user and direct them to the proper documentation.
  • tests are added to verify if the integration test environment is properly isolated.
  • the mock resolver used in integration testing is now accessible over IPv6.
  • both old and new versions of Docker/Compose are tested by using a matrix to ensure both versions keep working.
  • colors are enabled in pytest output in CI.

@aequitas aequitas force-pushed the newer-docker-versions branch 5 times, most recently from 8a8c548 to 27f1a24 Compare May 30, 2024 09:08
@aequitas aequitas marked this pull request as ready for review May 30, 2024 09:09
@aequitas aequitas force-pushed the newer-docker-versions branch 17 times, most recently from 457f08a to df979ef Compare June 3, 2024 14:51
@aequitas aequitas changed the title Test with newer docker version Newer docker version Jun 3, 2024
@aequitas aequitas force-pushed the newer-docker-versions branch 2 times, most recently from b6fc41d to fd6dc84 Compare June 3, 2024 15:47
@aequitas aequitas requested a review from mxsasha June 3, 2024 15:51
… Docker/Compose

Due to some changes in the handling of config files in Compose, some configurations might not work on older or newer versions of Docker/Compose. Use a matrix to test both.
…ronment.

Due to a change in Docker's DNS resolver (moby/moby#47589) in version 25.0.5 (https://docs.docker.com/engine/release-notes/25.0/#2505), traffic to the mock resolver used in integration/batch tests is no longer forwarded. This is fixed in moby/moby#47822 in version 26.0.3 (https://docs.docker.com/engine/release-notes/26.0/#2603).

- Temporary add upgrade commands to CI because 26.0.3 is not yet in the default CI image
- Add checks to warn about incompatible versions
- Add documentation to help developers get the right versions
Somehow Chromium disables IPv6 resolving when there is no IPv6 default route or when it cannot connect to a specific address: https://issues.chromium.org/issues/40435291

Switching to Firefox as browser until this can be solved.
- Docker Compose 2.24 broke behaviour we rely on for merging .env files. Versions since 2.27.1 restore this funcitonality: docker/compose#11824
@aequitas aequitas force-pushed the newer-docker-versions branch 5 times, most recently from cb7f9fe to ba377b6 Compare June 14, 2024 10:27
@aequitas aequitas mentioned this pull request Jun 17, 2024
3 tasks
@mxsasha mxsasha merged commit 95c9936 into main Jun 17, 2024
16 checks passed
@mxsasha mxsasha deleted the newer-docker-versions branch June 17, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants