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

[CI] Remove ansible-test custom containers #650

Conversation

laurent-indermuehle
Copy link
Collaborator

SUMMARY

This pull request aims to simplify our testing setup by removing custom test containers and using the default container provided by ansible-test.

Background

The current setup requires building custom test containers and cleaning up the registry manually, which is complex, especially for those not familiar with the system's initial implementation.

Changes Introduced
  • Removal of Custom Test Containers
  • Adoption of Default Ansible-Test Container:
    • Locally, the tests will run on an Ubuntu 20.04 container.
    • In GitHub Actions (GHA), the tests will run on an Ubuntu 22.04, utilizing ansible-community/ansible-test-gh-action.
Important Notes
Benefits
  • Reduced Complexity: Simplifies the process of adding/removing versions of the components.
  • Ease of Onboarding: Makes it easier for new contributors to understand and work with the test setup.
  • It's not longer to install the .deb and .py packages on the default container than using a custom container.
  • The test target controller_setup clearly states what is installed in the test container. No need to check the Containerfile in the hidden folder .github. Also, this allows using Ansible instead of bash, again simplifying things.
Risks

I believe the difference in Ubuntu images is a non-issue. We don't test Ubuntu here, and as long as all the test components are working in both environments, the job is done.
I don't see an easy way to align versions used:

  • make starts ansible-test with --docker from a Python venv. If the container version is forced using --target docker:ubuntu2204, then Python 3.10 is forced too. With the default container, all versions of Python are available (2.7 to 3.12 as of today).
  • GHA uses Ubuntu 22.04 explicitly and then starts ansible-test without the --docker option.
    Unless someone sees a way to make this more consistent between the two test methods, I propose to let this be as is and deal with it again when ansible-test changes its default container.
ISSUE TYPE
  • simplification
COMPONENT NAME
  • CI

@Andersson007
Copy link
Collaborator

yeah, it'd be great if we use that default container only:)

@laurent-indermuehle laurent-indermuehle changed the title Cut tests containers [CI] Remove ansible-test custom containers Jun 20, 2024
@laurent-indermuehle
Copy link
Collaborator Author

Green, finally!
All integrations tests took less than 10 minutes, so not longer than before!
Ready for review if someone could please have a look?

Copy link
Collaborator

@Andersson007 Andersson007 left a comment

Choose a reason for hiding this comment

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

@laurent-indermuehle looks like a great simplification! Thanks! You're a CI grand-guru:)

@Andersson007 Andersson007 merged commit 1922e71 into ansible-collections:main Jun 24, 2024
43 checks passed
@Andersson007
Copy link
Collaborator

After we drop mysqlclient it'll get significantly faster, looking forward to it

@laurent-indermuehle laurent-indermuehle deleted the lie_cut_test_containers branch June 24, 2024 08:35
@laurent-indermuehle
Copy link
Collaborator Author

@Andersson007 Yes and no, thanks to parallel execution on GHA. But we will use less resources for sure.
Also, Can I have a badge CI grand-guru for my resume? :P

@Andersson007
Copy link
Collaborator

@Andersson007 Yes and no, thanks to parallel execution on GHA. But we will use less resources for sure. Also, Can I have a badge CI grand-guru for my resume? :P

sure, if you create it you can:)

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