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

fix: updates GitHub Actions runner image and restart policy #255

Merged
merged 4 commits into from
Jul 12, 2024

Conversation

jpower432
Copy link
Member

@jpower432 jpower432 commented Jul 4, 2024

Description

Changes

  • Ubuntu 24.04 has version 4 of podman which is compatible with version of Docker (Note - this public beta slated to go GA in Sept)
  • v4 of podman has a default restart policy of always which cause unexpected behavior during tests (follow-on issue will be needed for this).

Rationale

Why use podman and docker?

They are used in different contexts. podman is used to manage containers in E2E testing. docker GitHub Actions are used for image building in the release pipeline.

  • Using podman pods is required to run the mock server and trestle-bot on the same network stack. It is also what the team is more familiar with.
  • In terms of image building in GitHub Actions, the docker actions have the features we need for image tag management and caching.

Alternatives

Open to discuss here or on the issue

  • Choose a single technology
  • Install Podman v4 on existing ubuntu-latest. This is possible through brew or manually, but we would need to back out the changes in Sept.

Fixes #251

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How has this been tested?

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

The newest version of the runner has podman v4
which is needed for compatibilty with the version of
docker
Restarting trestlebot containers cfreate unexpected behavior
because of the shared volume. For this use case, it should be never.

Signed-off-by: Jennifer Power <[email protected]>
@jpower432 jpower432 marked this pull request as draft July 4, 2024 00:56
@jpower432 jpower432 requested review from d10n and gvauter July 4, 2024 01:04
@jpower432 jpower432 marked this pull request as ready for review July 4, 2024 01:04
Copy link
Contributor

@gvauter gvauter left a comment

Choose a reason for hiding this comment

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

Questions on usage of logging in exception handlers.

try:
clean(tmpdir, repo)
except Exception as e:
logging.error(f"Failed to clean up temporary git repository: {e}")
Copy link
Contributor

Choose a reason for hiding this comment

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

@jpower432 should this use a logger instance vs logging?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for pointing this out. I think the logging statement should be removed here. It was left in for temporary debugging for an issue that this change resolves.

tests/conftest.py Outdated Show resolved Hide resolved
The logging statement was for debugging and should be removed
to ensure resource cleanup errors are properly logged

Signed-off-by: Jennifer Power <[email protected]>
@jpower432 jpower432 requested a review from gvauter July 8, 2024 21:51
@jpower432
Copy link
Member Author

@gvauter PTAL

Copy link
Contributor

@gvauter gvauter left a comment

Choose a reason for hiding this comment

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

LGTM

@jpower432 jpower432 merged commit 7fd64e0 into main Jul 12, 2024
11 checks passed
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.

Image publishing in failing in CI
2 participants