Skip to content

Add async support for HNS methods#756

Merged
ankitaluthra1 merged 10 commits intofsspec:mainfrom
ankitaluthra1:async-hns
Feb 18, 2026
Merged

Add async support for HNS methods#756
ankitaluthra1 merged 10 commits intofsspec:mainfrom
ankitaluthra1:async-hns

Conversation

@Mahalaxmibejugam
Copy link
Copy Markdown
Collaborator

@Mahalaxmibejugam Mahalaxmibejugam commented Feb 4, 2026

  • Added minor changes to support async functionality for HNS methods
  • Added test cases for HNS methods to verify functionality in async context
  • Included HNS tests in the Zonal bucket runs in CI pipeline
  • Updated mv method to use renameFolder HNS API even for rename to root directory

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 75.77%. Comparing base (6aef8e7) to head (5aef25a).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
gcsfs/core.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #756      +/-   ##
==========================================
+ Coverage   75.45%   75.77%   +0.31%     
==========================================
  Files          19       19              
  Lines        2885     2889       +4     
==========================================
+ Hits         2177     2189      +12     
+ Misses        708      700       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ankitaluthra1
Copy link
Copy Markdown
Collaborator

/gcbrun

Comment thread gcsfs/core.py
Comment thread cloudbuild/e2e-tests-cloudbuild.yaml
assert f2 in out


@pytest.mark.asyncio
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we should already have find(), info() related sync tests in test_core.py, adding more async tests for same functionality might be maintenance hassle, are they adding any specific value ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test file is specifically for verifying all the methods under async context, the tests in test_core.py and other integration tests are running in sync context.

These tests are not primarily for verifying functionality but more focused on invoking from async context and hence added only a basic test for each method.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets add this intent as documentation on the test_async_gcsfs file as well

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mv method calls copy internally and sets on_error to true. Earlier
onerror is set instead of on_error and hence it was getting ignored.

copy method uses rewrite API which works for objects and not on folders
or prefixes. So when mv is called on directory path, copy method would
throw error. Currently the sync mv method in spec.py is also setting the
wrong paramter onerror instead of on_error and hence this issue is not
noticed.
@ankitaluthra1
Copy link
Copy Markdown
Collaborator

/gcbrun

Comment thread gcsfs/extended_gcsfs.py Outdated
@ankitaluthra1
Copy link
Copy Markdown
Collaborator

/gcbrun

As we are temporarily not passing on_error parameter, we can move the
_mv to the GCSFileSystem as it is consistent with sync mv method.
@ankitaluthra1
Copy link
Copy Markdown
Collaborator

/gcbrun

@ankitaluthra1 ankitaluthra1 merged commit 1422085 into fsspec:main Feb 18, 2026
9 checks passed
@Mahalaxmibejugam Mahalaxmibejugam deleted the async-hns branch February 18, 2026 06:03
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.

3 participants