Skip to content

Improve error diagnostics for search_central_via_connection when search_path is None#708

Merged
JoeZiminski merged 2 commits into
fix_none_central_path_errorfrom
copilot/sub-pr-706-again
Mar 17, 2026
Merged

Improve error diagnostics for search_central_via_connection when search_path is None#708
JoeZiminski merged 2 commits into
fix_none_central_path_errorfrom
copilot/sub-pr-706-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 17, 2026

When search_path is None (Google Drive root case), the error message rendered as Error searching files at — no location context, making failures undiagnosable from logs.

Changes

  • datashuttle/utils/folders.py: Introduce display_search_path inside the if output.returncode != 0: block only — keeping it out of the hot path
    • When search_path is None: resolves to f"{rclone_config_name}:<root>" (e.g. gdrive-config:<root>)
    • Otherwise: uses final_search_path as before
if output.returncode != 0:
    display_search_path = (
        f"{rclone_config_name}:<root>"
        if search_path is None
        else final_search_path
    )
    utils.log_and_message(
        f"Error searching files at {display_search_path}\n"
        ...
    )

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…ne case

Co-authored-by: JoeZiminski <55797454+JoeZiminski@users.noreply.github.com>
Copilot AI changed the title [WIP] [WIP] Address feedback: Move display_search_path inside if block Improve error diagnostics for search_central_via_connection when search_path is None Mar 17, 2026
Copilot AI requested a review from JoeZiminski March 17, 2026 18:33
@JoeZiminski JoeZiminski marked this pull request as ready for review March 17, 2026 18:33
@JoeZiminski JoeZiminski merged commit 62df718 into fix_none_central_path_error Mar 17, 2026
1 check passed
@JoeZiminski JoeZiminski deleted the copilot/sub-pr-706-again branch March 17, 2026 18:33
JoeZiminski added a commit that referenced this pull request Mar 17, 2026
* Fix search path `None` case.

* Fix issues.

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Improve error diagnostics for `search_central_via_connection` when `search_path` is `None` (#708)

* Initial plan

* Move display_search_path into if block with rclone remote name for None case

Co-authored-by: JoeZiminski <55797454+JoeZiminski@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JoeZiminski <55797454+JoeZiminski@users.noreply.github.com>

* Add tests for `search_central_via_connection` with `search_path=None` (#707)

* Initial plan

* Add test for search_central_via_connection with search_path=None

Co-authored-by: JoeZiminski <55797454+JoeZiminski@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JoeZiminski <55797454+JoeZiminski@users.noreply.github.com>

* Revert AI nonsense.

* Small tidy up.

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants