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

UID2-4719 change azure cc starting process #1260

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

clarkxuyang
Copy link
Contributor

No description provided.

@clarkxuyang clarkxuyang force-pushed the xuy-UID2-4719-start-with-python branch 2 times, most recently from aedbc19 to e1c268a Compare January 13, 2025 03:34
@clarkxuyang clarkxuyang marked this pull request as ready for review January 13, 2025 04:53
@clarkxuyang clarkxuyang force-pushed the xuy-UID2-4719-start-with-python branch from a4e1422 to abb88d6 Compare January 13, 2025 04:55
@@ -51,7 +51,8 @@ def get_meta_url(cls) -> str:
class EC2(ConfidentialCompute):

def __init__(self):
super().__init__()
self.configs: AWSConfidentialComputeConfig = {}
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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):

Copy link
Contributor

@abuabraham-ttd abuabraham-ttd Jan 13, 2025

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

Copy link
Contributor

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

Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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

Copy link
Contributor

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.

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.

2 participants