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

Run API unit tests in a container in a GH runner, not directly in the GH runner #2044

Open
3 tasks
cris-oddball opened this issue Oct 9, 2024 · 1 comment
Open
3 tasks

Comments

@cris-oddball
Copy link

cris-oddball commented Oct 9, 2024

User Story - Business Need

On 9 OCT 2024, GitHub updated their runners such that ubuntu:latest was upgraded to 24.04.1. This failed to run the unit tests with this error

oscrypto.errors.LibraryNotFoundError: Error detecting the version of libcrypto

To work around this issue, the GH action that runs the tests was modified to pin ubuntu down to ubuntu-22.04 in this Hotfix.

After a brief discussion, the team decided that it would be best to run the unit tests in a container, preferably using Alpine (to match the API docker images). See the QA repo for an example, since those tests run in a container.

  • Ticket is understood, and QA has been contacted (if the ticket has a QA label).

User Story(ies)

As a VANotify engineer
I want to run unit tests in a container when I push my branch
So that we can completely control the OS the tests run on and not be at the mercy of a random GH upgrade.

Additional Info and Resources

Failed run
Screenshot 2024-10-09 at 12.35.18 PM.jpg

Apparently, the error can also happen when the memory is too low. We could try using a GH Ubuntu runner with more cores (and thus more memory) but the preferred outcome is to be able to fully control the OS the tests run in, which means using a container.

Acceptance Criteria

  • When I push to my remote branch, the unit tests run (via an action) inside an Alpine container using Poetry, not in the GitHub runner directly.
  • This work is added to the sprint review slide deck (key win bullet point and demo slide)

QA Considerations

Potential Dependencies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants