-
Notifications
You must be signed in to change notification settings - Fork 64
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
gracefully handle artifacts' API unavailability #709
Conversation
build_operation_url(self._client_config.api_url, self.ARTIFACTS_SWAGGER_PATH), | ||
self._http_client | ||
) | ||
except Exception: |
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.
A lot of different things can go wrong here. Exception does not necessarily mean artifacts are not supported.
Maybe we should add list of supported features to config returned from backend.
@Herudaio how urgent is it to make new clients work for onprems?
@@ -184,11 +193,18 @@ def __init__(self, credentials: Credentials, proxies: Optional[Dict[str, str]] = | |||
python_version=platform.python_version()) | |||
self._http_client.session.headers.update({'User-Agent': user_agent}) | |||
|
|||
if self.missing_features: | |||
warnings.warn(NeptuneFeaturesNotAvailableWarning(self.missing_features).message) |
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.
I am not a fan of printing this in every single Run.
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.
it's (now) a python warning, so the user can setup it to print only once
warnings.simplefilter("once", NeptuneFeaturesNotAvailableWarning)
or choose to ignore it alltogether
warnings.simplefilter("ignore", NeptuneFeaturesNotAvailableWarning)
either way, your fight is with spec, not me ;)
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.
spec has changed, so removing
5cfe4fa
to
43a44dd
Compare
ref. https://neptune-labs.atlassian.net/browse/NPT-10843