fix: bound response read in integration catalog fetch (#3812)

* fix: bound response read in integration catalog fetch

* fix: address review - update FakeResponse for bounded reads and add regression test

- Update FakeResponse.read() to accept size parameter for bounded reads
- Add test_fetch_rejects_oversized_catalog_response regression test
- Verifies _fetch_single_catalog uses MAX_JSON_METADATA_BYTES

Fixes #3812

* fix: resolve lint errors and update FakeResponse to support bounded reads

- Remove duplicate imports of MAX_JSON_METADATA_BYTES and read_response_limited
- Update FakeResponse.read() to accept size argument for read_response_limited
- Add offset tracking for proper bounded read behavior

Refs: #3812
This commit is contained in:
Quratulain-bilal
2026-08-06 10:21:02 -05:00
committed by GitHub
parent 4a465431b8
commit f71cfafa71
2 changed files with 83 additions and 128 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ class IntegrationCatalog(CatalogStackBase):
max_bytes=MAX_JSON_METADATA_BYTES,
error_type=IntegrationCatalogError,
label=f"catalog from {entry.url}",
)
).decode("utf-8")
)
shape_error = _catalog_shape_error(catalog_data)