Skip to content

Commit 2fe3e44

Browse files
zajcaclaude
andcommitted
fix: remove table-aliases from BranchAwareClient exclusion list
BranchAwareClient had /table-aliases in END_ENDPOINTS_WITHOUT_BRANCH, stripping the branch prefix for alias creation requests. This prevented the branch-aware routing from working correctly. Now alias creation goes through /branch/{id}/ like other endpoints, and the server-side checks (NotImplementedRouteChecker + requireNonDevBranchBucket) handle access control properly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6d9a81a commit 2fe3e44

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

src/Keboola/StorageApi/BranchAwareClient.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ class BranchAwareClient extends Client
1515
];
1616
private const END_ENDPOINTS_WITHOUT_BRANCH = [
1717
'/alias-filter', // filtered aliases are deprecated and not supported in branches
18-
'/table-aliases', // table aliases are not supported in branches
1918
];
2019

2120
private string|int $branchId;

tests/Client/BranchAwareClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public static function endpointsProvider(): Generator
102102
yield 'createAliasTable' => [
103103
'methodCall' => ['createAliasTable', ['foo', ['bar']]],
104104
'httpMethod' => 'POST',
105-
'expectedPath' => 'v2/storage/buckets/foo/table-aliases',
105+
'expectedPath' => 'v2/storage/branch/123/buckets/foo/table-aliases',
106106
'result' => ['id' => '123'],
107107
];
108108
yield 'test other' => [

0 commit comments

Comments
 (0)