The GitHub Actions job "ASAN and UBSAN Tests" on iceberg-cpp.git/main has 
succeeded.
Run started by GitHub user wgtmac (triggered by wgtmac).

Head commit for run:
4a71abe042ef4f62842b05dbc0bd076362ed9a94 / Feiyang Li <[email protected]>
feat: scaffolding work of rest catalog client (#296)

This PR introduces the foundational scaffolding for the Iceberg REST
Catalog client implementation in C++. It establishes the core
infrastructure for communicating with Iceberg REST Catalog servers
following the [Iceberg REST Catalog
Specification](https://iceberg.apache.org/spec/#rest-catalog).

### Key Components Added

#### 1. HTTP Client Infrastructure (`http_client.h/cc`)
* Implemented `HttpClient` class wrapping the CPR library for HTTP
operations.
* Supports `GET`, `POST`, `POST` (form-urlencoded), `HEAD`, and `DELETE`
methods.
*   Thread-safe session management with mutex protection.
* `HttpResponse` wrapper to abstract underlying HTTP library
implementation.

#### 2. Configuration Management (`catalog_properties.h/cc`)
*   `RestCatalogProperties` class for REST catalog configuration.

#### 3. Resource Path Construction (`resource_paths.h/cc`)
*   `ResourcePaths` class for building REST API endpoint URLs.

#### 4. Error Handling Framework (`error_handlers.h/cc`)
*   Hierarchical error handler design following the REST specification.
*   HTTP status code to ErrorKind mapping.
*   Also, extended `result.h` with new rest related error kinds.

#### 5. REST Utilities (`rest_util.h/cc`)
*   URL encoding/decoding (RFC 3986 compliant via libcurl).
*   Namespace encoding/decoding with ASCII Unit Separator (`0x1F`).
* Configuration merging with proper precedence (server overrides >
client config > server defaults).
*   String utilities (e.g., `TrimTrailingSlash`).

#### 7. RestCatalog Implementation (`rest_catalog.h/cc`)
*   `RestCatalog` class implementing the Catalog interface.
*   **Initialization workflow:**
    1.  Validates client configuration.
    2.  Fetches server configuration from `/v1/config`.
    3.  Merges server and client properties.
    4.  Updates resource paths based on final configuration.

### Testing
* `rest_util_test.cc`: Comprehensive tests for URL encoding/decoding,
namespace encoding, config merging.
* `rest_catalog_test.cc`: These currently introduced tests are merely
temporary integration tests that require a local REST server, such as
the `apache/iceberg-rest-fixture` Docker image While this enables local
testing, it is incompatible with the GitHub CI process, so they have
been marked as `DISABLED_`. In the future, we aim to follow the example
of iceberg-rust by designing comprehensive integration tests to verify
the REST catalog client's behavior and integrating them into our GitHub
CI pipeline. This work is scheduled for later completion; please refer
to issue #333.

Report URL: https://github.com/apache/iceberg-cpp/actions/runs/19724119344

With regards,
GitHub Actions via GitBox

Reply via email to