-
Notifications
You must be signed in to change notification settings - Fork 64
add runtime check for oauth in MR #381
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,6 +49,7 @@ | |
| from model_registry import ModelRegistry as ModelRegistryClient | ||
| from semver import Version | ||
| from utilities.general import wait_for_pods_by_labels | ||
| from utilities.infra import get_product_version | ||
|
|
||
| LOGGER = get_logger(name=__name__) | ||
|
|
||
|
|
@@ -226,7 +227,10 @@ def model_registry_instance( | |
| teardown=teardown_resources, | ||
| ) as mr: | ||
| mr.wait_for_condition(condition="Available", status="True") | ||
| mr.wait_for_condition(condition="OAuthProxyAvailable", status="True") | ||
| if is_model_registry_oauth or get_product_version(admin_client=admin_client) >= Version.parse( | ||
| version="2.22.0" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we use a constant for the version number? |
||
| ): | ||
| mr.wait_for_condition(condition="OAuthProxyAvailable", status="True") | ||
|
|
||
| yield mr | ||
|
|
||
|
|
@@ -502,8 +506,12 @@ def model_registry_instance_pod(admin_client: DynamicClient) -> Generator[Pod, A | |
|
|
||
|
|
||
| @pytest.fixture(scope="class") | ||
| def is_model_registry_oauth(request: FixtureRequest) -> bool: | ||
| return getattr(request, "param", {}).get("use_oauth_proxy", True) | ||
| def is_model_registry_oauth(request: FixtureRequest, get_product_version: Version, admin_client: DynamicClient) -> bool: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should not change this. It should be based on request.param and main is aligned with 2.23, so it should always be oauth. |
||
| product_version = get_product_version(admin_client=admin_client) | ||
| if product_version >= Version.parse(version="2.22.0"): | ||
| return getattr(request, "param", {}).get("use_oauth_proxy", True) | ||
| else: | ||
| return getattr(request, "param", {}).get("use_oauth_proxy", False) | ||
|
|
||
|
|
||
| @pytest.fixture(scope="session") | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Main is now pointing to 2.23. We should not work around testops image tag issue. They need to prioritize and fix it. We should not sign off otherwise.