Skip to content

Commit 6cf0a21

Browse files
VipulMascarenhasmingkang111
authored andcommitted
review comments
1 parent e7520f9 commit 6cf0a21

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

ads/aqua/extension/common_handler.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,19 @@ class CompatibilityCheckHandler(AquaAPIhandler):
2626

2727
@handle_exceptions
2828
def get(self):
29+
"""This method provides the availability status of Aqua. If ODSC_MODEL_COMPARTMENT_OCID environment variable
30+
is set, then status `ok` is returned. For regions where Aqua is available but the environment variable is not
31+
set due to accesses/policies, we return the `compatible` status to indicate that the extension can be enabled
32+
for the selected notebook session.
33+
34+
Returns
35+
-------
36+
status dict:
37+
ok or compatible
38+
Raises:
39+
AquaResourceAccessError: raised when aqua is not accessible in the given session/region.
40+
41+
"""
2942
if ODSC_MODEL_COMPARTMENT_OCID:
3043
return self.finish(dict(status="ok"))
3144
elif known_realm():

ads/aqua/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,4 +744,4 @@ def known_realm():
744744
Return True if aqua service is available.
745745
746746
"""
747-
return os.environ.get("CONDA_BUCKET_NS", "#") in AQUA_GA_LIST
747+
return os.environ.get("CONDA_BUCKET_NS") in AQUA_GA_LIST

0 commit comments

Comments
 (0)