Skip to content

support creation of zonal buckets using mkdir#769

Open
Mahalaxmibejugam wants to merge 4 commits intofsspec:mainfrom
ankitaluthra1:zonal-mkdir
Open

support creation of zonal buckets using mkdir#769
Mahalaxmibejugam wants to merge 4 commits intofsspec:mainfrom
ankitaluthra1:zonal-mkdir

Conversation

@Mahalaxmibejugam
Copy link
Contributor

@Mahalaxmibejugam Mahalaxmibejugam commented Feb 27, 2026

This PR refactors the mkdir method in ExtendedGcsFileSystem to add the support for creation of zonal buckets and enhances the readability.

Key Changes:

Support for zonal bucket creation:

  • Zonal buckets can be created now using the mkdir method, extra parameter placement needs to be passed to mkdir() to provide the zone where buckets needs to be created. All zonal buckets would be HNS enabled by default(for now) and would have the storage class as RAPID.

Refactored mkdir Logic:

  • Separated the configuration logic for Zonal buckets (setting customPlacementConfig and storageClass="RAPID") and HNS buckets (setting hierarchicalNamespace and uniformBucketLevelAccess).
  • Extracted HNS-specific folder creation logic into a helper method _create_hns_folder for better readability.
  • Ensured that when create_parents=True is used with a Zonal bucket request, the parent bucket is created with the correct Zonal configuration.
  • Explicit location Parameter(Earlier passed in kwargs):
    This is required when creating Zonal buckets to specify the parent region (e.g., us-central1) for the zone (e.g., us-central1-a).

Documentation:
Updated the mkdir docstring to clearly explain how to create Zonal buckets using the placement and location parameters.

Tests:
Added unit tests and integration tests to verify the zonal bucket creation and folder creation in zonal buckets.

@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.16%. Comparing base (8d19415) to head (d4f1658).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #769      +/-   ##
==========================================
- Coverage   75.78%   75.16%   -0.63%     
==========================================
  Files          19       14       -5     
  Lines        2924     2605     -319     
==========================================
- Hits         2216     1958     -258     
+ Misses        708      647      -61     

☔ 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
Collaborator

/gcbrun

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