Skip to content

Commit 3f8af05

Browse files
committed
Claude: test/gcp/gcp-iceberg-e2e.td
1 parent dfbced7 commit 3f8af05

5 files changed

Lines changed: 504 additions & 0 deletions

File tree

bin/ci-builder

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,10 @@ case "$cmd" in
274274
--env AZURE_SERVICE_ACCOUNT_PASSWORD
275275
--env AZURE_SERVICE_ACCOUNT_TENANT
276276
--env GCP_SERVICE_ACCOUNT_JSON
277+
# For test/gcp Iceberg E2E
278+
--env ICEBERG_GCS_BUCKET
279+
--env ICEBERG_GCP_PROJECT
280+
--env ICEBERG_GCP_SA_JSON_B64
277281
--env GITHUB_TOKEN
278282
--env GITHUB_GHCR_TOKEN
279283
--env GPG_KEY

ci/nightly/pipeline.template.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,20 @@ steps:
961961
- ./ci/plugins/mzcompose:
962962
composition: secrets-local-file
963963

964+
- group: GCP
965+
key: gcp
966+
steps:
967+
- id: gcp-real
968+
label: GCP (Real)
969+
depends_on: build-aarch64
970+
timeout_in_minutes: 30
971+
agents:
972+
# because of GCP access
973+
queue: linux-aarch64-small
974+
plugins:
975+
- ./ci/plugins/mzcompose:
976+
composition: gcp
977+
964978
- group: "Platform checks"
965979
key: platform-checks
966980
steps:

test/gcp/gcp-iceberg-e2e.td

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright Materialize, Inc. and contributors. All rights reserved.
2+
#
3+
# Use of this software is governed by the Business Source License
4+
# included in the LICENSE file.
5+
#
6+
# As of the Change Date specified in that file, in accordance with
7+
# the Business Source License, use of this software will be governed
8+
# by the Apache License, Version 2.0.
9+
10+
> CREATE SECRET gcpsa AS decode('${arg.gcp-sa-json-b64}', 'base64');
11+
12+
> CREATE CONNECTION gcpconn TO GCP (SERVICE ACCOUNT KEY = SECRET gcpsa);
13+
14+
> CREATE CONNECTION biglake TO ICEBERG CATALOG (
15+
CATALOG TYPE = 'rest',
16+
URL = 'https://biglake.googleapis.com/iceberg/v1/restcatalog',
17+
GCP CONNECTION = gcpconn,
18+
WAREHOUSE = 'gs://${arg.gcs-bucket}'
19+
);
20+
21+
> create table foo(a int, b text);
22+
23+
> insert into foo values (1, 'one'), (2, 'two'), (3, 'three');
24+
25+
> CREATE SINK demo
26+
FROM foo
27+
INTO ICEBERG CATALOG CONNECTION biglake (
28+
NAMESPACE '${arg.namespace}',
29+
TABLE '${arg.table}'
30+
)
31+
KEY (a) NOT ENFORCED
32+
MODE UPSERT
33+
WITH (COMMIT INTERVAL '1s');
34+
35+
# Iceberg sinks commit data asynchronously. We leave the sink running and let
36+
# mzcompose.py poll BigLake until the commit lands or times out.

test/gcp/mzcompose

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright Materialize, Inc. and contributors. All rights reserved.
4+
#
5+
# Use of this software is governed by the Business Source License
6+
# included in the LICENSE file at the root of this repository.
7+
#
8+
# As of the Change Date specified in that file, in accordance with
9+
# the Business Source License, use of this software will be governed
10+
# by the Apache License, Version 2.0.
11+
#
12+
# mzcompose — runs Docker Compose with Materialize customizations.
13+
14+
exec "$(dirname "$0")"/../../bin/pyactivate -m materialize.cli.mzcompose "$@"

0 commit comments

Comments
 (0)