Skip to content

fix(local-dev, v1.2): refresh Lakekeeper warehouse S3 endpoint when it already exists - #6999

Open
Yicong-Huang wants to merge 1 commit into
release/v1.2from
backport/6197-refresh-lakekeeper-warehouse-s3-endpoint-v1.2
Open

fix(local-dev, v1.2): refresh Lakekeeper warehouse S3 endpoint when it already exists #6999
Yicong-Huang wants to merge 1 commit into
release/v1.2from
backport/6197-refresh-lakekeeper-warehouse-s3-endpoint-v1.2

Conversation

@Yicong-Huang

@Yicong-Huang Yicong-Huang commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Backport of #6197 to release/v1.2, cherry-picked from aaed085. The cherry-pick applied cleanly.

Follows the Direct Backport Push convention; opened as a PR (rather than a direct push) per a backport-coverage audit.

Any related issues, documentation, discussions?

Backport of #6197. Originally linked #6195.

How was this PR tested?

Release-branch CI runs on this PR. Cherry-pick applied cleanly onto release/v1.2; no manual conflict resolution was needed.

Was this PR authored or co-authored using generative AI tooling?

Yes — backport prepared with Claude Code (mechanical cherry-pick; the change itself is #6197 by its original author).

🤖 Generated with Claude Code

…ady exists (#6197)

### What changes were proposed in this PR?

Makes `lakekeeper-init` (in `bin/single-node/docker-compose.yml`) keep
the Iceberg warehouse's S3 endpoint in sync with the current
`STORAGE_S3_ENDPOINT`. The warehouse persists its endpoint in
Lakekeeper's own DB; `local-dev` sets `STORAGE_S3_ENDPOINT` to the host
**LAN IP** (not `localhost`) so both the containerized Lakekeeper and
the host JVMs — which reach MinIO directly via Iceberg remote-signing —
use the same address. But that IP changes across networks / DHCP leases,
and the init was idempotent: it **skipped** the warehouse when it
already existed, so the stale endpoint was never refreshed. Workflow
execution then failed with an opaque
`org.apache.iceberg.exceptions.RESTException: Unable to process` at
`createTable`.

Instead of skipping, the existing-warehouse branch now `POST`s the
current endpoint + credentials to
`/management/v1/warehouse/{id}/storage` on every run. This is
non-destructive and preserves existing Iceberg tables (their metadata
stores `s3://bucket/...` paths, not the endpoint).

### Any related issues, documentation, discussions?

Closes #6195

### How was this PR tested?

- Verified the same `POST /management/v1/warehouse/{id}/storage` call
heals a live stack whose warehouse had a stale IP: it returned HTTP 200
and the vended endpoint updated to the current host IP, after which
workflow execution succeeded.
- `docker compose -f bin/single-node/docker-compose.yml config -q`
validates the file.
- Extracted the rendered `lakekeeper-init` command and confirmed `bash
-n` passes (after applying compose's runtime `$$`→`$` unescaping), so
the added heredoc/shell is syntactically sound.

### Was this PR authored or co-authored using generative AI tooling?

(backported from commit aaed085)

Generated-by: Claude Opus 4.8 (1M context)
@Yicong-Huang Yicong-Huang added the release/v1.2 back porting to release/v1.2 label Jul 29, 2026
@Yicong-Huang
Yicong-Huang requested a review from xuang7 July 29, 2026 04:11
@github-actions github-actions Bot added the infra label Jul 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @tanishqgandhi1908
    You can notify them by mentioning @tanishqgandhi1908 in a comment.

@Yicong-Huang Yicong-Huang removed the release/v1.2 back porting to release/v1.2 label Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants