Skip to content

Conversation

@jeronimodeleon
Copy link

Reason for Change:
Label Studio previously supported S3 and Azure storage backends but lacked native support for Backblaze B2 Cloud Storage.
This PR introduces full B2 integration, enabling import and export via Backblaze’s S3-compatible API.
The change expands Label Studio’s storage interoperability and provides an additional cost-efficient, scalable backend option.

Screenshots:
Backend: N/A (no visible changes)
Frontend:

  • New “Backblaze B2” option in the Cloud Storage provider dropdown
  • Configuration form fields for Application Key ID, Application Key, Bucket Name, and custom endpoint URL
  • Validation messages and Backblaze B2 SVG provider icon following existing S3/Azure styling patterns

Rollout Strategy:

  • Merge into develop branch; no feature flag required
  • Deploy as part of next minor release
  • Backwards-compatible with existing storage configurations

Testing:

  • Unit tests added for B2 storage models, serializers, and utils
  • Manual verification with both import and export workflows
  • Connection validation tested using valid/invalid credentials
  • Verified presigned URL generation for private buckets
  • End-to-end tested with 30+ sample images through Label Studio UI

Risks:

  • Minimal risk; isolated to new B2-specific backend logic
  • Network timeouts or invalid credentials may trigger handled exceptions
  • No impact to existing S3 or Azure storage integrations

Reviewer Notes:

  • Focus review on new backend integration under storage/backblaze_b2
  • Verify alignment with S3Storage and AzureStorage model patterns
  • Confirm serializer validation and API endpoint consistency
  • Frontend configuration mirrors S3 provider implementation

General Notes:

  • Uses boto3 with custom Backblaze S3-compatible endpoints
  • Adds both import and export functionality for B2
  • Implements presigned URLs for secure browser access
  • Includes client connection caching (~100ms improvement per request)
  • No breaking changes to existing Label Studio workflows

shahzaib149 and others added 4 commits October 21, 2025 14:43
Add complete support for Backblaze B2 Cloud Storage as a storage backend,
providing S3-compatible import/export functionality for Label Studio.

This implementation includes:

Backend Changes:
- B2 storage models with import/export support (models.py)
- S3-compatible boto3 integration with B2-specific endpoints
- Serializers with enhanced validation and error messages
- Database migrations for B2 storage models
- Comprehensive test coverage for B2 operations
- Client connection caching for improved performance (~100ms per request)

Frontend Changes:
- B2 provider configuration UI with field validation
- Backblaze cloud provider SVG icon (follows existing icon patterns)
- Form fields for B2 Application Keys and endpoint configuration
- Presigned URL settings and recursive scan options

Implementation Details:
- Uses boto3 with custom B2 S3-compatible endpoints
- Supports both import and export storage operations
- Implements presigned URLs for direct browser access
- Follows established patterns from S3 and Azure integrations
- Includes proper error handling and connection validation

Testing:
- Unit tests for B2 models and utilities
- Connection validation tests
- Import/export functionality verification

Breaking Changes: None
@jeronimodeleon jeronimodeleon requested a review from a team as a code owner October 21, 2025 18:48
@netlify
Copy link

netlify bot commented Oct 21, 2025

👷 Deploy request for label-studio-docs-new-theme pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 82622a4

@netlify
Copy link

netlify bot commented Oct 21, 2025

👷 Deploy request for heartex-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 82622a4

@netlify
Copy link

netlify bot commented Oct 21, 2025

Deploy Preview for label-studio-playground ready!

Name Link
🔨 Latest commit 82622a4
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-playground/deploys/68f7d567ca82240008546025
😎 Deploy Preview https://deploy-preview-8683--label-studio-playground.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added the feat label Oct 21, 2025
@netlify
Copy link

netlify bot commented Oct 21, 2025

Deploy Preview for label-studio-storybook ready!

Name Link
🔨 Latest commit 82622a4
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-storybook/deploys/68f7d5672e8eff0008994cb3
😎 Deploy Preview https://deploy-preview-8683--label-studio-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants