Skip to content

fix: branch-scoped file operations (#161) - #163

Merged
padak merged 1 commit into
release/0.18.7from
fix/161-branch-file-ops
Apr 14, 2026
Merged

fix: branch-scoped file operations (#161)#163
padak merged 1 commit into
release/0.18.7from
fix/161-branch-file-ops

Conversation

@padak

@padak padak commented Apr 14, 2026

Copy link
Copy Markdown
Member

Summary

  • Fix download-table and unload-table failing with NOT_FOUND on dev branch tables
  • Add branch_id parameter to get_file_info, delete_file, tag_file, untag_file in client.py
  • Pass branch_id through from download_table and unload_table_to_file in the service layer

Root cause

export_table_async correctly creates files in branch scope (/v2/storage/branch/{id}/tables/.../export-async), but the follow-up get_file_info call queried main scope (/v2/storage/files/{id}) — returning 404 because the file only exists in the branch scope.

Test plan

  • Client-level tests verify branch URL prefix for all 4 file methods
  • Service-level test for download_table with branch_id asserts get_file_info(file_id, branch_id=42)
  • Service-level test for unload_table_to_file with branch_id asserts both tag_file and get_file_info receive branch_id
  • Full test suite passes (1592 tests)

Closes #161

File endpoints in client.py (get_file_info, delete_file, tag_file,
untag_file) ignored branch_id, causing NOT_FOUND errors when
downloading or unloading tables from dev branches. The export job
creates files in branch scope, but subsequent file queries used
the main scope URL.

Add branch_id parameter to all four methods with proper URL prefix
(/v2/storage/branch/{id}/files/...) and pass it through from
download_table and unload_table_to_file in the service layer.

Closes #161
@padak
padak force-pushed the fix/161-branch-file-ops branch from 9b193e0 to 804eb08 Compare April 14, 2026 16:23
@padak
padak merged commit 0a5692a into release/0.18.7 Apr 14, 2026
@padak
padak deleted the fix/161-branch-file-ops branch April 14, 2026 16:23
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.

1 participant