fix: branch-scoped file operations (#161) - #163
Merged
Conversation
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
force-pushed
the
fix/161-branch-file-ops
branch
from
April 14, 2026 16:23
9b193e0 to
804eb08
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
download-tableandunload-tablefailing withNOT_FOUNDon dev branch tablesbranch_idparameter toget_file_info,delete_file,tag_file,untag_fileinclient.pybranch_idthrough fromdownload_tableandunload_table_to_filein the service layerRoot cause
export_table_asynccorrectly creates files in branch scope (/v2/storage/branch/{id}/tables/.../export-async), but the follow-upget_file_infocall queried main scope (/v2/storage/files/{id}) — returning 404 because the file only exists in the branch scope.Test plan
download_tablewithbranch_idassertsget_file_info(file_id, branch_id=42)unload_table_to_filewithbranch_idasserts bothtag_fileandget_file_inforeceivebranch_idCloses #161