Skip to content

Commit

Permalink
chore: add warning in hybrid mode (#413)
Browse files Browse the repository at this point in the history
Signed-off-by: ThibaultFy <[email protected]>
  • Loading branch information
ThibaultFy authored Apr 22, 2024
1 parent f94acb3 commit 9423d4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/413.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A warning indicates when a `Client` is set in hybrid mode
4 changes: 4 additions & 0 deletions substra/sdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,10 @@ def _get_backend(self, backend_type: schemas.BackendType):
if backend_type in [schemas.BackendType.LOCAL_DOCKER, schemas.BackendType.LOCAL_SUBPROCESS]:
backend = None
if self._url:
logger.warning(
f"Backend mode {backend_type} given with a URL is a hybrid mode. The client will connect to the "
"platform in read-only."
)
backend = backends.get(
schemas.BackendType.REMOTE,
url=self._url,
Expand Down

0 comments on commit 9423d4a

Please sign in to comment.