File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed
preview/reasoning_engines/templates Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -1654,8 +1654,15 @@ def _warn_if_telemetry_api_disabled(self):
16541654
16551655 def project_id (self ) -> Optional [str ]:
16561656 if project := self ._tmpl_attrs .get ("project" ):
1657- from google .cloud .aiplatform .utils import resource_manager_utils
1657+ try :
1658+ from google .cloud .aiplatform .utils import (
1659+ resource_manager_utils ,
1660+ )
1661+ from google .api_core import exceptions
16581662
1659- return resource_manager_utils .get_project_id (project )
1663+ return resource_manager_utils .get_project_id (project )
1664+ # Fail open as temporary workaround for identity_type config parameter
1665+ except (exceptions .PermissionDenied , exceptions .Unauthenticated ):
1666+ return project
16601667
16611668 return None
Original file line number Diff line number Diff line change @@ -1561,8 +1561,15 @@ def _warn_if_telemetry_api_disabled(self):
15611561
15621562 def project_id (self ) -> Optional [str ]:
15631563 if project := self ._tmpl_attrs .get ("project" ):
1564- from google .cloud .aiplatform .utils import resource_manager_utils
1564+ try :
1565+ from google .cloud .aiplatform .utils import (
1566+ resource_manager_utils ,
1567+ )
1568+ from google .api_core import exceptions
15651569
1566- return resource_manager_utils .get_project_id (project )
1570+ return resource_manager_utils .get_project_id (project )
1571+ # Fail open as temporary workaround for identity_type config parameter
1572+ except (exceptions .PermissionDenied , exceptions .Unauthenticated ):
1573+ return project
15671574
15681575 return None
You can’t perform that action at this time.
0 commit comments