Repository navigation
Report missing cloud SDK dependencies before client setup - #601
Open
terminalchai wants to merge 2 commits into
Open
terminalchai wants to merge 2 commits into
terminalchai wants to merge 2 commits into
Conversation
terminalchai
requested a deployment
to
reviewed-live-cloud
October 10, 2026 19:35 — with
GitHub Actions
Waiting
terminalchai
requested a deployment
to
reviewed-live-cloud
October 10, 2026 19:35 — with
GitHub Actions
Waiting
terminalchai
requested a deployment
to
reviewed-live-cloud
October 10, 2026 19:35 — with
GitHub Actions
Waiting
terminalchai
requested a deployment
to
reviewed-live-cloud
October 10, 2026 19:35 — with
GitHub Actions
Waiting
terminalchai
requested a deployment
to
reviewed-live-cloud
October 10, 2026 19:35 — with
GitHub Actions
Waiting
pjbull
requested changes
Oct 11, 2026
| raise ModuleNotFoundError(f"No module named {name!r}") | ||
| return original_import(name, globals, locals, fromlist, level) | ||
|
|
||
| builtins.__import__ = import_without_sdk |
Member
There was a problem hiding this comment.
_run_isolated in tests/test_gs_specific.py already starts a fresh interpreter and makes modules unimportable with sys.modules[name] = None.
Let's add it to utils build a way to reuse that path instead across tests and providers.
Comment on lines
+58
to
+62
| except MissingDependenciesError as error: | ||
| assert client_name in str(error) | ||
| assert f"pip install cloudpathlib[{provider}]" in str(error) | ||
| else: | ||
| raise AssertionError("Expected MissingDependenciesError") |
Member
There was a problem hiding this comment.
Print messages and assert correct output from the subprocess in the main process rather than asserting so the subprocess fails
terminalchai
requested a deployment
to
reviewed-live-cloud
October 13, 2026 21:32 — with
GitHub Actions
Waiting
terminalchai
requested a deployment
to
reviewed-live-cloud
October 13, 2026 21:32 — with
GitHub Actions
Waiting
terminalchai
requested a deployment
to
reviewed-live-cloud
October 13, 2026 21:32 — with
GitHub Actions
Waiting
terminalchai
requested a deployment
to
reviewed-live-cloud
October 13, 2026 21:32 — with
GitHub Actions
Waiting
terminalchai
requested a deployment
to
reviewed-live-cloud
October 13, 2026 21:32 — with
GitHub Actions
Waiting
This branch is waiting to be deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Constructing an S3 or GCS client without its optional SDK can raise
NameErrorbefore the existing dependency validation runs. Validate dependencies at the start of those constructors so direct clients, default clients and paths reportMissingDependenciesErrorwith the appropriate install command. Azure already validates before using SDK names.Closes #441.
The regression tests cover three providers and five construction entry points. They reuse
run_isolatedfromtests/utils.py, extracted from the existing GCS import-fallback tests. The helper starts a fresh interpreter and blocks modules throughsys.modules; child scripts print error messages, and pytest checks the exception type, client name and install hint in the parent process.Validation on Windows with Python 3.11:
git diff --checkpass.Contributor checklist:
Prepared with AI assistance; the diff and test results were reviewed before submission.