Skip to content

Commit 5179c63

Browse files
Include prefix in string replaced similar to core_url (#1851)
* Update azr.py
1 parent 35b9df5 commit 5179c63

File tree

6 files changed

+8
-2
lines changed

6 files changed

+8
-2
lines changed

scripts/azure-cc/azr.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def __create_final_config(self):
5858

5959
config = config.replace("https://core.uidapi.com", self.configs["core_base_url"])
6060
config = config.replace("https://optout.uidapi.com", self.configs["optout_base_url"])
61+
config = config.replace("unknown", self.configs["uid_instance_id_prefix"])
6162
with open(AZR.FINAL_CONFIG, "w") as file:
6263
file.write(config)
6364

@@ -167,4 +168,4 @@ def _setup_auxiliaries(self) -> None:
167168
except ConfidentialComputeStartupError as e:
168169
logging.error(f"Failed starting up Azure Confidential Compute. Please checks the logs for errors and retry {e}", exc_info=True)
169170
except Exception as e:
170-
logging.error(f"Unexpected failure while starting up Azure Confidential Compute. Please contact UID support team with this log {e}", exc_info=True)
171+
logging.error(f"Unexpected failure while starting up Azure Confidential Compute. Please contact UID support team with this log {e}", exc_info=True)

scripts/azure-cc/conf/integ-uid2-config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"optout_api_uri": "https://optout.uidapi.com/optout/replicate",
1313
"cloud_encryption_keys_metadata_path": "https://core.uidapi.com/cloud_encryption_keys/retrieve",
1414
"optout_s3_folder": "uid-optout-integ/",
15+
"uid_instance_id_prefix": "unknown",
1516
"runtime_config_store": {
1617
"type": "http",
1718
"config" : {

scripts/azure-cc/conf/prod-uid2-config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"optout_api_uri": "https://optout.uidapi.com/optout/replicate",
1414
"optout_s3_folder": "optout-v2/",
1515
"identity_token_expires_after_seconds": 259200,
16+
"uid_instance_id_prefix": "unknown",
1617
"runtime_config_store": {
1718
"type": "http",
1819
"config" : {

scripts/gcp-oidc/conf/integ-config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"core_attest_url": "https://core.uidapi.com/attest",
1212
"cloud_encryption_keys_metadata_path": "https://core.uidapi.com/cloud_encryption_keys/retrieve",
1313
"optout_api_uri": "https://optout.uidapi.com/optout/replicate",
14+
"uid_instance_id_prefix": "unknown",
1415
"optout_s3_folder": "uid-optout-integ/",
1516
"runtime_config_store": {
1617
"type": "http",
@@ -19,4 +20,4 @@
1920
},
2021
"config_scan_period_ms": 300000
2122
}
22-
}
23+
}

scripts/gcp-oidc/conf/prod-config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"optout_api_uri": "https://optout.uidapi.com/optout/replicate",
1414
"optout_s3_folder": "optout-v2/",
1515
"identity_token_expires_after_seconds": 259200,
16+
"uid_instance_id_prefix": "unknown",
1617
"runtime_config_store": {
1718
"type": "http",
1819
"config" : {

scripts/gcp-oidc/gcp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def __populate_operator_config(self, destination):
6767
config = file.read()
6868
config = config.replace("https://core.uidapi.com", self.configs.get("core_base_url"))
6969
config = config.replace("https://optout.uidapi.com", self.configs.get("optout_base_url"))
70+
config = config.replace("unknown", self.configs.get("uid_instance_id_prefix"))
7071
with open(destination, 'w') as file:
7172
file.write(config)
7273

0 commit comments

Comments
 (0)