Skip to content

Commit bfaf24a

Browse files
default to prod
1 parent 0e8cf84 commit bfaf24a

2 files changed

Lines changed: 4 additions & 44 deletions

File tree

libraries/microsoft-agents-a365-runtime/microsoft_agents_a365/runtime/environment_utils.py

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,9 @@
77
import os
88

99
# Authentication scopes for different environments
10-
TEST_OBSERVABILITY_SCOPE = "https://api.test.powerplatform.com/.default"
11-
PREPROD_OBSERVABILITY_SCOPE = "https://api.preprod.powerplatform.com/.default"
1210
PROD_OBSERVABILITY_SCOPE = "https://api.powerplatform.com/.default"
1311

1412
# Cluster categories for different environments
15-
TEST_OBSERVABILITY_CLUSTER_CATEGORY = "test"
16-
PREPROD_OBSERVABILITY_CLUSTER_CATEGORY = "preprod"
1713
PROD_OBSERVABILITY_CLUSTER_CATEGORY = "prod"
1814

1915
# Default environment names
@@ -28,43 +24,7 @@ def get_observability_authentication_scope() -> list[str]:
2824
Returns:
2925
list[str]: The authentication scope for the current environment.
3026
"""
31-
environment = _get_current_environment()
32-
33-
environment_lower = environment.lower()
34-
35-
if environment_lower == "development":
36-
# For now, map "development" to preprod scope for local testing
37-
return [PREPROD_OBSERVABILITY_SCOPE]
38-
elif environment_lower == "test":
39-
return [TEST_OBSERVABILITY_SCOPE]
40-
elif environment_lower == "production":
41-
return [PROD_OBSERVABILITY_SCOPE]
42-
else:
43-
# Default to production scope
44-
return [PROD_OBSERVABILITY_SCOPE]
45-
46-
47-
def get_observability_cluster_category() -> str:
48-
"""
49-
Returns the cluster category for the observability service based on the current environment.
50-
51-
Returns:
52-
str: The cluster category for the current environment.
53-
"""
54-
environment = _get_current_environment()
55-
56-
environment_lower = environment.lower()
57-
58-
if environment_lower == "development":
59-
# For now, map "development" to preprod scope for local testing
60-
return PREPROD_OBSERVABILITY_CLUSTER_CATEGORY
61-
elif environment_lower == "test":
62-
return TEST_OBSERVABILITY_CLUSTER_CATEGORY
63-
elif environment_lower == "production":
64-
return PROD_OBSERVABILITY_CLUSTER_CATEGORY
65-
else:
66-
# Default to production cluster category
67-
return PROD_OBSERVABILITY_CLUSTER_CATEGORY
27+
return [PROD_OBSERVABILITY_SCOPE]
6828

6929

7030
def is_development_environment() -> bool:

libraries/microsoft-agents-a365-runtime/microsoft_agents_a365/runtime/power_platform_api_discovery.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ def _get_hex_api_suffix_length(self) -> int:
7070
def _get_environment_api_host_name_suffix(self) -> str:
7171
cluster_to_suffix = {
7272
"local": "api.powerplatform.localhost",
73-
"dev": "api.dev.powerplatform.com",
74-
"test": "api.test.powerplatform.com",
75-
"preprod": "api.preprod.powerplatform.com",
73+
"dev": "api.powerplatform.com",
74+
"test": "api.powerplatform.com",
75+
"preprod": "api.powerplatform.com",
7676
"firstrelease": "api.powerplatform.com",
7777
"prod": "api.powerplatform.com",
7878
"gov": "api.gov.powerplatform.microsoft.us",

0 commit comments

Comments
 (0)