Skip to content

Fix missing staging_dir in CloudTarUploader created on archive split - #1176

Open
hobostay wants to merge 1 commit into
EnterpriseDB:masterfrom
hobostay:fix/missing-staging-dir-split-uploader
Open

hobostay wants to merge 1 commit into
EnterpriseDB:masterfrom
hobostay:fix/missing-staging-dir-split-uploader

Conversation

@hobostay

@hobostay hobostay commented May 3, 2026

Copy link
Copy Markdown

Summary

  • In CloudUploadController._get_tar() (barman/cloud.py), when a tar archive exceeds max_archive_size and needs to be split into parts, the newly created CloudTarUploader is missing the staging_dir parameter
  • The initial uploader (created at line 428-436) correctly passes staging_dir=self.staging_dir, but the split uploader (line 442-451) does not
  • This causes split archives to use the system default temp directory instead of the explicitly configured staging directory, which can lead to failures if the staging dir was configured on a specific volume with sufficient space

Bug details

The initial uploader creation passes staging_dir:

CloudTarUploader(
    ...
    staging_dir=self.staging_dir,  # Present ✓
)

But the split uploader does not:

CloudTarUploader(
    ...
    # staging_dir=self.staging_dir  # Missing! ✗
)

Test plan

  • Confirm split archive uploads use the configured staging directory
  • Verify existing cloud upload tests pass

🤖 Generated with Claude Code

When a tar archive exceeds max_archive_size and is split, the newly
created CloudTarUploader was not receiving the staging_dir parameter.
This caused it to fall back to the system default temp directory instead
of the explicitly configured staging directory.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@martinmarques

Copy link
Copy Markdown
Contributor

Please open a github issue referencing this PR. You should always have an issue, even before working on this

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