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

Clean up around TestInfrahubDockerClient #5550

Draft
wants to merge 1 commit into
base: stable
Choose a base branch
from
Draft

Conversation

LucasG0
Copy link
Contributor

@LucasG0 LucasG0 commented Jan 22, 2025

Prior PR before sdk changes allowing sdk tests to run against multiple versions of infrahub. It contains some cleanup and should simplify / make explicit which version / image-tag we use while using TestInfrahubDockerClient. So:

  • A user writing some SDK tests can still specify infrahub_version of a given test.
  • We will still use INFRAHUB_TESTING_IMAGE_TAG (former INFRAHUB_TESTING_IMAGE_VER) to specify which version to use from CI.

It also adds a check_skip so we can specify for specific tests whether they should be skipped depending on tested infrahub version.

@github-actions github-actions bot added group/backend Issue related to the backend (API Server, Git Agent) group/ci Issue related to the CI pipeline labels Jan 22, 2025
Copy link

codspeed-hq bot commented Jan 22, 2025

CodSpeed Performance Report

Merging #5550 will not alter performance

Comparing lgu-fix-dc-env (b998165) with stable (ee9b3e7)

Summary

✅ 11 untouched benchmarks


from .container import PROJECT_ENV_VARIABLES, InfrahubDockerCompose
DEFAULT_INFRAHUB_SERVER_VERSION = "latest"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a placeholder, I am not sure we should use latest here. It could be importlib.metadata.version("infrahub-testcontainers") instead so it corresponds to a close infrahub version to the sdk one.

@@ -28,6 +28,9 @@ class Namespace(str, Enum):
TEST = "test"


LOCAL_BUILD_DEFAULT_IMAGE_NAME = "local.build/opsmill/infrahub"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use a different name than registry.opsmill.io/opsmill/infrahub to make explicit the image is not pulled from the registry

@LucasG0 LucasG0 marked this pull request as draft January 22, 2025 20:22
@LucasG0 LucasG0 marked this pull request as ready for review January 23, 2025 07:51
@LucasG0 LucasG0 marked this pull request as draft January 23, 2025 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group/backend Issue related to the backend (API Server, Git Agent) group/ci Issue related to the CI pipeline
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant