Skip to content

[26.1] Fix creating a Google Drive repository on a Drive with no Galaxy files - #24765

Merged
dannon merged 1 commit into
galaxyproject:release_26.1from
davelopez:26.1-fix-gdrive-empty-root
Nov 6, 2026
Merged

dannon merged 1 commit into
galaxyproject:release_26.1from
davelopez:26.1-fix-gdrive-empty-root

Conversation

@davelopez

Copy link
Copy Markdown
Contributor

Fixes #24764.

Creating a Google Drive repository fails for every new connection. After the user grants access, clicking Create runs a connection test that lists the root of the Drive, and it fails with:

Failed to connect to a file source with supplied settings: Problem listing file source path . Reason:

Galaxy requests the drive.file scope, so it only sees files it created itself, and the root of a new connection is empty. Since #22696 the plugin lists Drive through gdrive_fsspec, and version 0.4.1 raises FileNotFoundError("") for an empty root. This change treats an empty root as an empty listing; listing a path that doesn't exist still fails.

Note

The library has fixed this in fsspec/gdrive-fsspec#64, which is not in a release yet. Once Galaxy uses a release that includes it, the workaround can be removed.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.

  • This is a refactoring of components with existing test coverage.

  • Instructions for manual testing are as follows:

    1. Configure the google_drive file source template with a Google OAuth2 client.
    2. Go to User → Preferences → Manage Your Repositories → Create New → Google Drive, and allow access with an account that Galaxy hasn't written to yet.
    3. Enter a name and click Create: the repository is created instead of failing with the error above.

    The bug was reproduced on usegalaxy.eu (26.1). The fix was checked with a temporary unit test that lists the root through the real Google API client with an empty Drive response: it failed with the error above without the fix and passed with it. It is not included, because it would be skipped in CI (gdrive_fsspec is not a test dependency) and the workaround is temporary.

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

gdrive_fsspec 0.4.1 raises FileNotFoundError("") when listing an empty
Drive root. Galaxy requests the drive.file scope, so it only sees files
it created itself, and the root of a new connection is always empty.
The connection test that runs on Create lists the root, so creating a
Google Drive repository failed with "Problem listing file source path .
Reason:" for every new connection.

Treat an empty root as an empty listing; missing paths still raise.
The library has fixed this in fsspec/gdrive-fsspec#64, which is not in a
release yet.

galaxyproject#24764
@github-project-automation github-project-automation Bot moved this to Needs Review in Galaxy Dev - weeklies Nov 6, 2026
@github-actions github-actions Bot added this to the 27.0 milestone Nov 6, 2026
@davelopez
davelopez requested a review from a team November 6, 2026 10:55
@dannon
dannon merged commit f1fd95e into galaxyproject:release_26.1 Nov 6, 2026
54 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Review to Done in Galaxy Dev - weeklies Nov 6, 2026
@davelopez
davelopez deleted the 26.1-fix-gdrive-empty-root branch November 6, 2026 13:20
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

This PR was merged without a "kind/" label, please correct.

@davelopez

Copy link
Copy Markdown
Contributor Author

Thanks for the quick review and merge Dannon!

@github-actions github-actions Bot modified the milestones: 27.0, 26.2 Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

2 participants