Skip to content

Commit 07a3eda

Browse files
devin-ai-integration[bot]jordanrburger
authored andcommitted
fix: remove linked bucket test from Common suite to fix phpstan-main
The testSourceTableMetadataInLinkedBucketApiResponse test was incorrectly present in the Common suite after rebase. This test uses STORAGE_API_LINKING_TOKEN which is only available in Mixed/BYODB suites. The test is already properly placed in tests/E2E/Backend/Mixed/SharingTest.php. This fixes the phpstan-main CI failure. Co-Authored-By: vojtech.biberle@keboola.com <vojtech.biberle@gmail.com> style: fix phpcs violations after rebase Co-Authored-By: vojtech.biberle@keboola.com <vojtech.biberle@gmail.com> fix: separate source column metadata map to prevent duplicates - Create separate sourceColumnsMetadataMap for source column metadata - Keep columnsMetadataMap only for table's own column metadata - Add array_unique to source column composite IDs to avoid duplicates - Update createMetadataResponseForTable to use sourceColumnsMetadataMap for sourceTable.columnMetadata - Fixes issue where source column metadata was duplicated when source table is in same bucket as alias Co-Authored-By: vojtech.biberle@keboola.com <vojtech.biberle@gmail.com> fix: pass null instead of empty array for table metadata in tests - Fix testSourceTableColumnMetadataInLinkedBucketApiResponse in SharingTest.php - Fix testSourceTableColumnMetadataInAliasTableApiResponse in MetadataTest.php - TableMetadataUpdateOptions constructor now validates that if tableMetadata is provided, it must be non-empty - Pass null instead of [] when only setting column metadata to satisfy validation Co-Authored-By: vojtech.biberle@keboola.com <vojtech.biberle@gmail.com> docs: add sourceColumnMetadata parameter to API documentation - Add sourceColumnMetadata to all include parameter lists in apiary.apib - Update descriptions to clarify sourceMetadata is for table metadata only - Update descriptions to clarify sourceColumnMetadata is for column metadata only - Document that both flags work across projects for linked buckets Co-Authored-By: vojtech.biberle@keboola.com <vojtech.biberle@gmail.com> feat: add sourceColumnMetadata include parameter - Add new sourceColumnMetadata include value to separately control source column metadata fetching - Keep metadata and columnMetadata for table's own metadata - Keep sourceMetadata for source table metadata - Add sourceColumnMetadata for source column metadata - Update tests to use new sourceColumnMetadata flag instead of relying on sourceMetadata - Remove duplicate sourceTablesMetadataMap initialization - Separate source column metadata logic from columnMetadata flag Co-Authored-By: vojtech.biberle@keboola.com <vojtech.biberle@gmail.com> feat: gate source column metadata behind sourceMetadata flag - Update Storage_Service_Metadata to only fetch source column metadata when both columnMetadata and sourceMetadata flags are present - Update tests in Common and Mixed suites to require both flags for positive cases - Add negative tests to verify sourceTable.columnMetadata is not present without sourceMetadata flag - Update API documentation to clarify sourceMetadata gates both table and column metadata Refs: AI-1876 Co-Authored-By: Jordan Burger <jordanrburger@gmail.com> feat: add column metadata support for alias tables in linked buckets - Add getColumnsMetadataByCompositeIds() method to Model_Metadata for efficient column metadata fetching - Update Storage_Service_Metadata to fetch column metadata for source tables with projectId=null for cross-project support - Add test in Common suite to verify column metadata for same-project aliases - Add test in Mixed suite to verify column metadata for linked buckets across projects - Update API documentation to clarify columnMetadata works across projects for linked buckets Refs: AI-1876 Co-Authored-By: Jordan Burger <jordanrburger@gmail.com> fix(phpstan): remove STORAGE_API_LINKING_TOKEN baseline entry The linked bucket test that used STORAGE_API_LINKING_TOKEN was moved to the Mixed suite, so this baseline entry is no longer needed. Refs: AI-1876 Co-Authored-By: Jordan Burger <jordanrburger@gmail.com> fix(tests): address PR review comments - Restore public visibility to TEST_PROVIDER, TEST_METADATA_KEY_1, TEST_METADATA_KEY_2 constants - Remove duplicate ISO8601_REGEXP constant (inherited from StorageApiTestCase) - Move testSourceTableMetadataInLinkedBucketApiResponse to Mixed suite - Update test to use proper Mixed suite patterns (_client, _client2, initTestBuckets) - Update PHPStan baseline for reduced STORAGE_API_URL error count The linked bucket test requires STORAGE_API_SHARE_TOKEN and STORAGE_API_LINKING_TOKEN which are only available in Mixed/BYODB suites, not in Common suite. Refs: AI-1876 Co-Authored-By: Jordan Burger <jordanrburger@gmail.com> feat: include all source table metadata in sourceMetadata flag - Remove KBC.description filter to include all table-level metadata - Update API documentation to reflect all metadata is returned - Update tests to verify all metadata keys are returned - Add assertions for additional metadata keys in test cases Refs: AI-1876 Co-Authored-By: Jordan Burger <jordanrburger@gmail.com> feat: add include=sourceMetadata flag for alias tables - Add new include=sourceMetadata parameter to expose source table metadata - Filter source metadata to only KBC.description entries - Update tests to use new flag and verify backwards compatibility - Update API documentation to document new flag Refs: AI-1876 Co-Authored-By: Jordan Burger <jordanrburger@gmail.com> chore(AI-1876): update PHPStan baseline for new linked bucket test - Update STORAGE_API_URL constant count from 2 to 3 - Add STORAGE_API_LINKING_TOKEN constant ignore entry (count 1) - Addresses PHPStan failures from new testSourceTableMetadataInLinkedBucketApiResponse test Co-Authored-By: Jordan Burger <jordanrburger@gmail.com> fix(AI-1876): fix cross-project metadata fetch and add linked bucket test - Fix critical bug: pass null for projectId when fetching source table metadata to support cross-project linked buckets - Fix test assertion: check for specific keys/providers instead of exact count to handle system-generated metadata - Add E2E test for linked buckets (primary use case requested by reviewer) Addresses reviewer feedback from @vojtabiberle Co-Authored-By: Jordan Burger <jordanrburger@gmail.com> perf: optimize source table metadata fetching to avoid N+1 queries - Add getTablesMetadataByCompositeIds method to fetch specific tables only - Refactor to use targeted fetch instead of fetching entire bucket metadata - Addresses performance concern about fetching all tables in source buckets Co-Authored-By: Jordan Burger <jordanrburger@gmail.com> fix: Use listTables instead of getTable with options in test PHPStan error: getTable() only accepts 1 parameter, not 2. Fixed by using listTables() with ['include' => 'metadata'] option to retrieve alias table with sourceTable.metadata for testing. Co-Authored-By: Jordan Burger <jordanrburger@gmail.com> feat: Expose source table metadata in API response for alias tables - Add sourceTable.metadata field to API response for alias tables - Update Metadata service to fetch and include source table metadata - Update API documentation in apiary.apib with example - Add comprehensive test for sourceTable.metadata in alias table API response This enables MCP Server and UI to access table descriptions from shared buckets through the API without requiring metadata synchronization. Co-Authored-By: Jordan Burger <jordanrburger@gmail.com> style(tests): fix phpcs violations in MetadataTest - Remove trailing whitespace from empty lines - Add trailing commas to multi-line function calls Auto-fixed with phpcbf after rebase introduced style issues. Refs: AI-1876 Co-Authored-By: Jordan Burger <jordanrburger@gmail.com> style(tests): fix phpcs violations in SharingTest - Remove trailing whitespace from empty lines - Add trailing commas to multi-line function calls Refs: AI-1876 Co-Authored-By: Jordan Burger <jordanrburger@gmail.com> fix(tests): address reviewer feedback and fix ECS violation - Fix ECS EarlyExitNotUsed violation on line 1075 - Replace getClient with getClientForToken per reviewer comment - Invert condition to use early exit pattern Refs: AI-1876 Co-Authored-By: Jordan Burger <jordanrburger@gmail.com> fix(tests): replace deprecated method and fix ECS violations - Replace postTableMetadata with postTableMetadataWithColumns - Replace early return patterns with direct assertFalse assertions - Fixes ECS EarlyExitNotUsed violations Refs: AI-1876 Co-Authored-By: Jordan Burger <jordanrburger@gmail.com> style(tests): fix ECS EarlyExitNotUsed in MetadataTest - Refactor if/isset patterns to use early exit - Invert conditions and add early returns - No logic changes, style-only fix Refs: AI-1876 Co-Authored-By: Jordan Burger <jordanrburger@gmail.com> ci: retrigger required label check Co-Authored-By: Jordan Burger <jordanrburger@gmail.com>
1 parent 6202e15 commit 07a3eda

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

apiary.apib

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,6 +1325,8 @@ Obtains information about a bucket.
13251325
+ `metadata` - each table will include list of it's metadata
13261326
+ `columns` - each table will include list of it's columns
13271327
+ `columnMetadata` - each table will include list of it's columns metadata
1328+
+ `sourceMetadata` - For alias tables, includes source table metadata in sourceTable.metadata. Works across projects for linked buckets
1329+
+ `sourceColumnMetadata` - For alias tables, includes source column metadata in sourceTable.columnMetadata. Works across projects for linked buckets
13281330

13291331
+ Request
13301332
+ Headers
@@ -2286,6 +2288,15 @@ Lists tables in a given bucket.
22862288
"id": 578,
22872289
"name": "Some source project"
22882290
},
2291+
"metadata": [
2292+
{
2293+
"id": "206180829",
2294+
"key": "KBC.description",
2295+
"value": "Table containing data types",
2296+
"provider": "user",
2297+
"timestamp": "2019-08-12T14:36:08+0200"
2298+
}
2299+
],
22892300
"columnMetadata": {
22902301
"ID": [
22912302
{
@@ -3880,6 +3891,8 @@ attributes and information about the containing bucket.
38803891
+ columns
38813892
+ metadata
38823893
+ columnMetadata
3894+
+ sourceMetadata - For alias tables, includes source table metadata in sourceTable.metadata. Works across projects for linked buckets
3895+
+ sourceColumnMetadata - For alias tables, includes source column metadata in sourceTable.columnMetadata. Works across projects for linked buckets
38833896
+ Default: metadata
38843897
38853898
+ Request
@@ -9002,6 +9015,8 @@ attributes and information about the containing bucket. At least one of paramete
90029015
+ columns
90039016
+ metadata
90049017
+ columnMetadata
9018+
+ sourceMetadata - For alias tables, includes source table metadata in sourceTable.metadata. Works across projects for linked buckets
9019+
+ sourceColumnMetadata - For alias tables, includes source column metadata in sourceTable.columnMetadata. Works across projects for linked buckets
90059020
+ Default: metadata
90069021
+ metadataKey (optional, string) - string to search with exact match on one of existing metadata.key
90079022
+ Default: NULL

0 commit comments

Comments
 (0)