-
Notifications
You must be signed in to change notification settings - Fork 17
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
UID2-4719 change azure cc starting process #1260
base: main
Are you sure you want to change the base?
Conversation
aedbc19
to
e1c268a
Compare
a4e1422
to
abb88d6
Compare
@@ -51,7 +51,8 @@ def get_meta_url(cls) -> str: | |||
class EC2(ConfidentialCompute): | |||
|
|||
def __init__(self): | |||
super().__init__() | |||
self.configs: AWSConfidentialComputeConfig = {} |
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.
Do we need this here? self.configs {} is defined in base class
|
||
def _validate_auxiliaries(self) -> None: | ||
""" Validates auxiliary services are running.""" | ||
pass |
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.
shouldn't __wait_for_sidecar be here?
@@ -5,6 +5,7 @@ | |||
from abc import ABC, abstractmethod | |||
from typing import TypedDict, NotRequired, get_type_hints | |||
import subprocess | |||
import logging |
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.
👍
from azure.core.exceptions import ResourceNotFoundError, HttpResponseError | ||
|
||
class AzureEntryPoint(ConfidentialCompute): | ||
|
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.
Change this to Azure? This class name is used to create Errors/point to docs in ConfidentialComputeStartupException
secret = secret_client.get_secret(AzureEntryPoint.secret_name) | ||
# print(f"Secret Value: {secret.value}") | ||
self.configs["api_token"] = secret.value | ||
|
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.
Does this only set api_token ? Don't we need ConfidentialComputeConfig
to validate all user specific config
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.
IMO;
_set_secret should be setting ConfidentialComputeConfig (which contains all the possible customer inputs to create Confidential Compute env for running operators) . That's why I used _get_secret() -> ConfidentialComputeConfig
If we use _set_secret -> None, then there is no way to ensure/understand what values it sets.
|
||
except CredentialUnavailableError as auth_error: | ||
logging.error(f"Read operator key, authentication error: {auth_error}") | ||
raise |
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.
raise custom exception here? That points to public doc? This is the same as Missing Instance Profile in AWS
|
||
except ResourceNotFoundError as not_found_error: | ||
logging.error(f"Read operator key, secret not found: {AzureEntryPoint.secret_name}. Error: {not_found_error}") | ||
raise |
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.
raise custom exception here? That points to public doc? ConfigNotFound
|
||
except HttpResponseError as http_error: | ||
logging.error(f"Read operator key, HTTP error occurred: {http_error}") | ||
raise |
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.
When would we have this? Is it tied to vnet creation? If Container Group does not have n/w configured? If so, another custom exception for Azure that points to doc, and explaining what is wrong
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.
Basically the goal is;
Every issue we know, should be caught as Custom Exception that points to public documentation on how to fix it.
Things we don' know, will be a regular exception that mentions how to/contact us.
No description provided.