Skip to content

Commit

Permalink
SkipValidations
Browse files Browse the repository at this point in the history
  • Loading branch information
abuabraham-ttd committed Dec 19, 2024
1 parent 061050d commit 9ee0d14
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions scripts/aws/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,11 @@ def _setup_auxiliaries(self) -> None:
self.__setup_vsockproxy(log_level)
self.__run_config_server()
self.__run_socks_proxy()
print("Finished setting up auxilaries")

def _validate_auxiliaries(self) -> None:
"""Validates connection to flask server direct and through socks proxy."""
print("Validating auxilaries")
try:
for attempt in range(10):
try:
Expand Down Expand Up @@ -212,7 +214,8 @@ def run_compute(self) -> None:
secret_manager_key = self.__get_secret_name_from_userdata()
self.configs = self._get_secret(secret_manager_key)
print(f"Fetched configs from {secret_manager_key}")
self.configs.get("skip_validations", False) and self.validate_configuration()
if not self.configs.get("skip_validations"):
self.validate_configuration()
self._setup_auxiliaries()
self._validate_auxiliaries()
self.__run_nitro_enclave()
Expand Down Expand Up @@ -251,5 +254,5 @@ def __kill_auxiliaries(self) -> None:
else:
ec2.run_compute()
except Exception as e:
print("Failed starting up Confidential Compute")
print("Failed starting up Confidential Compute. Please contact uid2", e)

2 changes: 1 addition & 1 deletion scripts/confidential_compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self):

def validate_configuration(self):
""" Validates the paramters specified through configs/secret manager ."""

print("Validating configurations provided")
def validate_operator_key():
""" Validates the operator key format and its environment alignment."""
operator_key = self.configs.get("api_token")
Expand Down

0 comments on commit 9ee0d14

Please sign in to comment.