Repository navigation
Conversation
|
/review |
1c38fe9 to
d953617
Compare
|
Thanks for the review. All eight findings are addressed in Blocker 1: root-owned configuration volume. Confirmed. With Blocker 2: storage traffic going to AWS. Confirmed: credentials vended for an
Nit 1: ports on all interfaces. Every published port in both files now binds to Nit 2: 12-hour STS expiry. Gone with Blocker 2's fix. Each vend is a fresh one-hour session, and nothing static is written into Nit 3: Cargo secret in a build layer. The secret is now mounted at Nit 4: Nginx resolves the bridge once. It now uses Nit 5:
Nit 6: no CI check for the lockfile. Added "Check ui-new bun lock" to Also changed after a further review of my own:
On the summary's note that the Testing section is empty: the description has one. It's now updated with these runs. |
|
/review |
d953617 to
35517e1
Compare
|
Thanks for the second pass. All three blockers and the nits are addressed in Blocker 1: partial encryption key. Blocker 2: any lookup failure treated as missing.
The create and update calls only send their stdout to Blocker 3: stop grace period. Added Nit 1: Nit 2: README.
Nit 3: missing key file. Nit 4: Nit 5:
|
|
/review |
35517e1 to
5c0f260
Compare
|
Thanks. All three blockers are fixed in Blocker 1: socket-only Blocker 2: the CLI exits 0 on rejected arguments. Confirmed:
Against a stand-in
Blocker 3: the bridge ignores SIGTERM. The bridge image now sets
Nit 1: the key is in Nit 2: Nit 3: README accuracy.
Nit 4: no CI for the container files. The lint workflow now runs Nit 5: orphans and the
|
|
/review |
5c0f260 to
1faa28f
Compare
|
Thanks. The blocker and nits 2 to 5 are addressed in Blocker 1: changing the bucket leaves the UI down. Confirmed in Nit 1: probe Nit 2: the PostgreSQL password is a literal. It's now Nit 3: the port-publishing reason. The paragraph now says both files publish on Nit 4: no automated check of
It passes under Nit 5: |
|
/review |
1faa28f to
8e7afd5
Compare
|
Thanks. Nits 1, 2, 3, 4, 6 and 7 are addressed in Nit 1: no tests for
Nit 2:
The stand-in now records each write's full arguments, and the test checks the credential's Nit 3: stale Nit 4: auth on with no provider. The README now says to set Nit 5: duplicated definitions and the shared project name. Unchanged, as in earlier rounds. The README describes how the two files interact. Nit 6: README security notes. It now says that Nit 7:
|
|
/review |
Add Compose files that run ui-new in containers: - docker-compose.yaml builds this checkout's Unity Catalog server and runs it with PostgreSQL, RustFS object storage, the Rust bridge, and the SPA behind Nginx. config-init creates the bucket, copies the .properties files of the repository's etc/conf into a volume with local PostgreSQL and storage settings, and gives the volume to the server's uid 100:101, as the Helm chart does. The server runs with authorization off and its default managed-table settings, and gets the database password, POSTGRES_PASSWORD or a default, as UC_HIBERNATE_CONNECTION_PASSWORD, as the chart passes it. upgrade-schema then runs bin/start-uc-server --upgrade-schema, as the chart's init container does, since the server no longer sets up a new database's schema itself. - Once the server is up, storage-init registers RustFS as an s3_compatible storage credential with an external location for the bucket, so the server reaches it at RustFS and vends short-lived, path-scoped sessions that name RustFS's endpoint. The bucket name is fixed, since the server won't move a location that is in use. storage-init updates both on every start, which also re-encrypts the credential with the current key, and creates them only when the server reports them missing. Each call must return JSON naming the entity, since the CLI exits 0 when it rejects its arguments. The secret is encrypted with UC_SERVER_CREDENTIAL_ENCRYPTION_KEY, which the chart sets from server.credentialEncryptionKeySecret; left empty, a key generated once into the configuration volume, written beside its name and renamed into place, is used. - docker-compose-remote.yaml runs only the bridge and web against the Unity Catalog server named by UC_SERVER. Both files publish ports on 127.0.0.1 unless BIND_ADDRESS says otherwise: authorization is off and PostgreSQL and RustFS use default credentials. The long-running services restart when they exit. The server gets the 20 seconds docs/server/configuration.md asks for to stop; the bridge stops on SIGINT, which it handles gracefully, with 35 seconds to finish an in-flight RPC. PostgreSQL counts as healthy once it accepts TCP connections, as the server connects, not just on its socket. RustFS and the AWS CLI are pinned, RustFS to the image the server's tests use. Both images generate their protobuf code from proto/ during the build, the web image with the buf that bun.lock pins and the bridge image with the same version, so a fresh checkout builds without running buf first. The web build ignores web/*.local, so a checkout's local Vite settings never reach the image. The bridge binary is owned by root, so the runtime user can't replace it. Nginx 1.30, the stable branch, proxies /uc.v1.*, /config, and /healthz to the bridge, re-resolving it at most every 10 seconds so a recreated bridge is found; it serves index.html for client-side routes and allows 4 MiB request bodies to match Connect's default limit. Private registries are environment-only: NPM_REGISTRY_URL, CARGO_REGISTRY_URL, MAVEN_PROXY_URL, or an optional CARGO_CONFIG_FILE BuildKit secret, mounted where Cargo reads it so it never lands in a layer. Strip the 447 npm proxy tarball URLs that ui-new/web/bun.lock has carried since unitycatalog#1902; only the resolution fields change, not versions or integrity hashes. Check ui-new/web/bun.lock for them in the lint workflow and in a pre-commit hook next to the existing ui/bun.lock ones, and name the right script in the check's hint. The lint workflow also runs shellcheck on the container scripts, tests of config-init, start-server and storage-init against stand-ins for the AWS CLI, the server launcher and bin/uc, and docker compose config on both Compose files. Closes unitycatalog#1893 Signed-off-by: Scott Haines <[email protected]> Co-authored-by: Isaac <[email protected]>
8e7afd5 to
0faa05d
Compare
|
Thanks. Nits 1, 3, 4 and 5 are addressed in Nit 1: local Vite env files reach the image.
Nit 2: PostgreSQL on host port 5432. Left as is. Nit 3: untested overrides and ownership.
A stand-in Nit 4: reserved names and paired volumes. The README now says the credential and location names Nit 5: "copies |
roeap
left a comment
There was a problem hiding this comment.
A few comments to look at.
| entry: bash -c 'cd ui && bun run clean-bun-lock' | ||
| files: ^ui/bun\.lock$ | ||
| pass_filenames: false | ||
| - id: clean-bun-lock-ui-new |
There was a problem hiding this comment.
I found doing this as a post-install action to be more convenient and robust. Maybe something to consider?
There was a problem hiding this comment.
Agreed, switched in ad03e3c. clean-bun-lock now runs as the ui-new/web postinstall, and the ui-new pre-commit entry is gone, so this PR no longer touches .pre-commit-config.yaml. Bun saves the lockfile before it runs the root postinstall: a bun add that wrote 448 proxy URLs left none, and a bun install leaves the committed lockfile unchanged. The web image copies the script in before its bun install --frozen-lockfile, which would otherwise fail on the missing script. The lint step's --check stays as the CI gate.
| FROM bufbuild/buf:1.72.0 AS buf | ||
|
|
||
| FROM rust:1.88-bookworm AS build | ||
|
|
||
| COPY --from=buf /usr/local/bin/buf /usr/local/bin/buf |
There was a problem hiding this comment.
| FROM bufbuild/buf:1.72.0 AS buf | |
| FROM rust:1.88-bookworm AS build | |
| COPY --from=buf /usr/local/bin/buf /usr/local/bin/buf | |
| FROM rust:1.88-bookworm AS build | |
| COPY --from=bufbuild/buf:1.72.0 /usr/local/bin/buf /usr/local/bin/buf |
I think this might also work.
There was a problem hiding this comment.
Done in ad03e3c: COPY --from=bufbuild/buf:1.72.0@sha256:…, and the separate stage is gone.
| # The buf version web/bun.lock pins, which a local build.rs run uses. | ||
| FROM bufbuild/buf:1.72.0 AS buf | ||
|
|
||
| FROM rust:1.88-bookworm AS build |
There was a problem hiding this comment.
We should pin images with their SHA.
There was a problem hiding this comment.
Done in ad03e3c. Every image is now tag@sha256: with its multi-arch digest, as the root Dockerfile and the Helm chart do: the # syntax= lines, rust, debian, buf, bun and nginx-unprivileged in the Dockerfiles, and postgres, aws-cli and rustfs (now with its 1.0.4 tag) in Compose.
| FROM debian:bookworm-slim AS runtime | ||
|
|
||
| RUN apt-get update \ | ||
| && apt-get install --no-install-recommends -y ca-certificates curl \ | ||
| && rm -rf /var/lib/apt/lists/* \ | ||
| && groupadd --system --gid 10001 unitycatalog \ | ||
| && useradd --system --uid 10001 --gid unitycatalog --home-dir /app unitycatalog \ | ||
| && mkdir -p /app \ | ||
| && chown unitycatalog:unitycatalog /app | ||
|
|
||
| # Owned by root, so the unitycatalog user can run the binary but not replace it. | ||
| COPY --from=build /tmp/uc-ui-bridge /usr/local/bin/uc-ui-bridge | ||
|
|
||
| ENV PORT=8081 | ||
|
|
||
| USER unitycatalog | ||
| WORKDIR /app | ||
|
|
||
| EXPOSE 8081 | ||
|
|
||
| # The bridge shuts down gracefully, finishing in-flight RPCs, on SIGINT. | ||
| STOPSIGNAL SIGINT | ||
|
|
||
| HEALTHCHECK --interval=5s --timeout=3s --start-period=5s --retries=12 \ | ||
| CMD ["curl", "--fail", "--silent", "http://localhost:8081/healthz"] | ||
|
|
||
| ENTRYPOINT ["uc-ui-bridge"] |
There was a problem hiding this comment.
This being rust, I believe we might as well go distroless from the beginning? After some iteration i found that the pattern e.g. in https://github.com/open-lakehouse/headwaters/blob/main/Dockerfile work quite well and produces nice images. Also, adopting cargo-chef cuts down on build times significantly.
There was a problem hiding this comment.
Agreed on both, and thanks for the headwaters pointer. We're leaving them out of this PR and tracking them in #2412. From a first look: distroless cc-debian12 has the same glibc as the bookworm build image, and the bridge's rustls needs no OpenSSL. cargo chef cook replaces our build.rs with a stub, so the cached dependency layer needs no buf. The open points are the health check without curl, and getting CARGO_REGISTRY_URL to cook, which doesn't take our --config flags.
There was a problem hiding this comment.
as long as the UI bridge is a hard requirement, does it make sense to just copy that bundle into the bridge image and serve it from there?
THe same image from above also contains that as an examplke. https://github.com/open-lakehouse/headwaters/blob/main/Dockerfile
There was a problem hiding this comment.
this is a good point. Let me look at what you've done in the example.
There was a problem hiding this comment.
Following up: we'll do this in #2413 rather than in this PR. It brings back the SPA serving that #2262 removed from the bridge (WEB_DIST), builds the bundle in a stage of the bridge image, and then drops the web image, nginx.conf and the web service from both Compose files. It pairs with #2412, since both reshape server/Dockerfile.
| - uc_conf:/conf | ||
|
|
||
| postgres: | ||
| image: postgres:16.3 |
There was a problem hiding this comment.
Pinned in ad03e3c, as postgres:16.3@sha256:…, along with the other images.
Addresses the review of the ui-new container environments: - Pin every image as tag@sha256 with its multi-arch digest, as the root Dockerfile and the Helm chart do: the Dockerfile syntax image, rust, debian, buf, bun and nginx-unprivileged in the Dockerfiles, and postgres, aws-cli and rustfs in Compose. - Copy buf straight from the bufbuild/buf image instead of a named stage. - Run clean-bun-lock as the web package's postinstall, in place of the ui-new pre-commit hook. Bun saves the lockfile before the root postinstall runs, so bun install, add and update leave no proxy URLs to stage. The web image copies the script in before its install, and the lint workflow's --check stays as the CI gate. Signed-off-by: Scott Haines <[email protected]> Co-authored-by: Isaac <[email protected]>
|
/review |
yili-db
left a comment
There was a problem hiding this comment.
[AI Assisted] Reviewed at ad03e3c. I ran the core stack (postgres, rustfs, config-init, upgrade-schema, unitycatalog, storage-init) on non-default ports and built the web image. storage-init creates the credential and location on first start and updates them on re-run. The lint steps pass locally. I could not run the bridge image: its cargo fetch needs index.crates.io, which does not resolve from my host. The first inline item is the one normal finding, and I reproduced it; the rest are nits.
| dockerfile: web/Dockerfile | ||
| args: | ||
| NPM_REGISTRY_URL: "${NPM_REGISTRY_URL:-}" | ||
| restart: unless-stopped |
There was a problem hiding this comment.
[AI Assisted] web has no stop_grace_period, so on docker compose down Docker sends SIGKILL 10 seconds in, while nginx (graceful on SIGQUIT) may still be proxying a bridge RPC that has up to 30 seconds left. I reproduced this with a slow stub bridge: the request was cut at 10 seconds. With stop_grace_period: 35s on web, the same request returned 200 and the container exited 0. The rendered config differs by that one key. The web service in docker-compose-remote.yaml (line 32) needs the same change.
There was a problem hiding this comment.
Thanks for reproducing it. Fixed in cc4e9a0: web gets stop_grace_period: 35s in both files. I re-ran it with the bridge pointed at a server that accepts connections and never answers. With stop -t 10, the RPC was cut at 13 s and web exited 137. With the new value, the RPC finished with the bridge's timeout response at 30 s and web exited 0.
|
|
||
| # The stand-in answers per STUB_MODE and records each write's arguments in | ||
| # STUB_CALLS. The real CLI exits 0 when it rejects its arguments, printing help. | ||
| cat > "$work/bin/uc" <<'EOF' |
There was a problem hiding this comment.
[AI Assisted] The stub bin/uc accepts any option, so a renamed or removed CLI flag passes CI and only fails at docker compose up. Could the stub reject options that the real CLI does not list in its help, for example from bin/uc credential create --help? The full smoke run could go in a cross-linked followup issue.
There was a problem hiding this comment.
Done in cc4e9a0. The stand-in now reads the CLI's own option table at test time (CliUtils.cliOptions and commonOptions, with the names from CliParams) and takes only the options listed for each command. For any other option, or a missing required one, it prints help and exits 0, as UnityCatalogCli does; it also refuses an option without its leading --, which the CLI would ignore. A new check drops s3_endpoint from the table, as if the CLI no longer took it, and storage-init then fails on its first write. Commands are looked up by the CLI's own values, so a renamed entity or operation, or a table the test can't read, fails the test rather than accepting every option. The full smoke run is #2428.
|
|
||
| location /assets/ { | ||
| try_files $uri =404; | ||
| expires 1y; |
There was a problem hiding this comment.
[AI Assisted] nit: expires 1y and the add_header Cache-Control both emit a Cache-Control header, so /assets/ gets two. Dropping expires and putting max-age in the add_header gives one header with the same routing.
There was a problem hiding this comment.
Fixed in cc4e9a0: add_header Cache-Control "public, max-age=31536000, immutable" and no expires, so an asset now comes back with that one header.
| command: ["sh", "/docker/start-server.sh"] | ||
| restart: unless-stopped | ||
| # The server can need 15 seconds to stop with its default settings; see | ||
| # server.shutdown-timeout in docs/server/configuration.md. |
There was a problem hiding this comment.
[AI Assisted] nit: these comments cite other files by name: docs/server/configuration.md here, the Helm chart value names at lines 19-20 and 41, and the Helm chart in config-init.sh and start-server.sh. They will drift. Could we keep the why and drop the cross-references?
There was a problem hiding this comment.
Done in cc4e9a0. The comments in the Compose file, config-init.sh and start-server.sh keep the reason and no longer name docs/server/configuration.md, the Helm chart or its values. storage-init.sh's "see the note there" now gives the reason itself.
| else | ||
| fail "could not look up $entity $name:" "$output" | ||
| fi | ||
| log "${action%e}ing $entity $name" |
There was a problem hiding this comment.
[AI Assisted] nit: ${action%e}ing works, but it is hard to read. Could each branch name its verb explicitly?
There was a problem hiding this comment.
Done in cc4e9a0: each branch logs updating or creating itself.
| && apt-get install --no-install-recommends -y ca-certificates curl \ | ||
| && rm -rf /var/lib/apt/lists/* \ | ||
| && groupadd --system --gid 10001 unitycatalog \ | ||
| && useradd --system --uid 10001 --gid unitycatalog --home-dir /app unitycatalog \ |
There was a problem hiding this comment.
[AI Assisted] nit: useradd --system --uid 10001 warns in the build log because the uid is above SYS_UID_MAX (999). Dropping --system or accepting the warning would both work.
There was a problem hiding this comment.
Dropped --system from both groupadd and useradd in cc4e9a0. The build log no longer warns, and the user is still uid and gid 10001.
| # Authorization stays off: the stack sets up no identity provider. | ||
| { | ||
| printf '\n# Local Compose overrides generated by config-init.\n' | ||
| printf 'server.authorization=disable\n' |
There was a problem hiding this comment.
[AI Assisted] nit: the overrides are appended, so server.authorization appears in both the template copy and the override, and hibernate.connection.url appears twice in hibernate.properties. Last wins and the test checks the last line, so this works. Filtering the keys before appending would leave one value per key. Optional.
There was a problem hiding this comment.
Done in cc4e9a0. config-init copies each template without the keys the overrides set, so each key has one value. The test's templates now set some of those keys, plus server.authorization-url, which only shares a prefix and is kept. In a full run, each overridden key appeared once in the volume's server.properties and hibernate.properties.
| catalog without one: `config-init` sets the deprecated `storage-root.tables` | ||
| fallback to the bucket. | ||
|
|
||
| To restart the stack in order, run `docker compose down` and then |
There was a problem hiding this comment.
[AI Assisted] nit: with pull_policy: never, a plain docker compose up after a server code change keeps the old image. Could this paragraph say to use up --build after code changes?
There was a problem hiding this comment.
Added in cc4e9a0: up starts the images it built before, so add --build after changing the server, bridge, or web code.
- Give the web service stop_grace_period: 35s in both Compose files. Nginx drains in-flight requests on SIGQUIT, but Docker killed it 10 seconds in, cutting an RPC that was still waiting on the bridge's 30-second Unity Catalog timeout. - Have the storage-init test's bin/uc stand-in take only the options the CLI lists for each command, read from CliUtils.cliOptions and CliParams, and print help for any other, as the CLI does. A renamed or removed CLI option now fails the lint step instead of compose up. - Copy each etc/conf template without the keys config-init overrides, so each key has one value, and check that in the test. - Send one Cache-Control header for /assets/. - Create the bridge image's user and group without --system, which warned for uid 10001. - Log explicit verbs in storage-init, keep the reasons in comments without naming other files, and say in the README to add --build after code changes. Signed-off-by: Scott Haines <[email protected]> Co-authored-by: Isaac <[email protected]>
|
Thanks for the review. Every inline item is addressed in cc4e9a0; the replies are on each thread, and the full Compose smoke run in CI is #2428. On the bridge build: Cargo fetches from crates.io unless the build is pointed at a mirror. |
|
/review |
- Print the last attempt's output when config-init's wait for RustFS or storage-init's wait for the server times out, so wrong RustFS keys or a CLI that can't start no longer look like a slow start. - Run the container checks in their own lint workflow job, with each script's test in the image the script runs in: the AWS CLI image for config-init, and the server image's Alpine base for the others. - Have storage-init-test name the CLI file it could not parse, and say above CliUtils.cliOptions that the test reads it. - Check every credential argument on create and update, a first start that stopped after the credential, and both wait timeouts. - Share the server image's definition between the three services that use it, and say at UI_AUTH_ENABLED and in the README that it gates only the UI. Signed-off-by: Scott Haines <[email protected]> Co-authored-by: Isaac <[email protected]>
|
Addressed the AI review of cc4e9a0 in 4cc8c5d: Nit 1: wait timeouts hide the cause. Fixed. Both waits keep each attempt's output. On timeout, Nit 2: the storage-init test is coupled to the CLI's source.
Nit 3: CI doesn't build or start the stack. This is #2428, already listed under Follow-ups. It builds the images, runs Nit 4: tests run under dash, not in the images. Fixed. The new job runs each test in the image its script runs in. Nit 5: credential arguments, the update path, and mixed states aren't checked. Fixed:
Swapping the keys, dropping the role, or registering the location only after creating the credential each fail the test. Nit 6: Nit 7: duplicated Compose definitions. In part:
The PR description is updated to match. |
|
/review |
Picks up unitycatalog#2289, which moves the S3-compatible endpoint from the credential to the external location and removes server.s3-compatible-storage.enabled. Signed-off-by: Scott Haines <[email protected]> Co-authored-by: Isaac <[email protected]>
unitycatalog#2289 moved the S3-compatible endpoint from the credential to the external location, renamed the credential type s3_compatible_access_key, and removed server.s3-compatible-storage.enabled. On main, storage-init's credential create with --s3_endpoint printed the CLI's help and stopped the stack; the storage-init test caught it on the PR's merge with main. - storage-init registers the credential with only the keys and the role, and the location with --endpoint http://rustfs:9000 and --path_style_access true: a virtual-hosted address such as uc-warehouse.rustfs doesn't resolve on the Compose network. - config-init no longer writes the removed property. - The tests, the README and the Compose comment follow. Signed-off-by: Scott Haines <[email protected]> Co-authored-by: Isaac <[email protected]>
|
The new "Check ui-new container files" job failed on 4cc8c5d, and it was right to. CI tests the PR merged with I merged
Verified on a fresh stack, with the server image rebuilt from the branch merged with
A stack created before this change has its credential and location in the old form. #2289 doesn't let an update add an endpoint to a location that has none, so |
PR Checklist
docsis updated (ui-newis documented inui-new/README.mduntil [UI] Docs: Document using the New UI console. #1953 adds it todocs.)Description of changes
Closes #1893.
Running
ui-newtoday means starting a Unity Catalog server, the Rust bridge, and Vite by hand. This adds Compose environments so the console runs with one command, either as a full local stack or against an existing Unity Catalog server.ui-new/docker-compose.yaml: full local stack.Dockerfile, so the UI runs against the server code beside it.config-initcreates the bucket, then copies the.propertiesfiles of the repository'setc/confinto a volume, with local PostgreSQL and storage settings in place of theirs, so each key has one value. There's no second config tree underui-new.100:101, as the Helm chart does foretc/conf.docker compose restartstarts alongside it never reads a half-written file. Leftover temporary files from an interrupted run are deleted first, and only the files the run wrote are renamed into place.storage-root.tablesto the bucket. That is the fallback managed tables created through Iceberg REST and Spark (staging tables) use in a catalog without a storage root, so dropping it would break those creates. Volumes and models have no such fallback, so the README says to give their catalog a storage root.hibernate.properties. It's passed asUC_HIBERNATE_CONNECTION_PASSWORD, as the chart passes it, and set withPOSTGRES_PASSWORD(defaultuc_default_password), which PostgreSQL uses when it creates its volume.upgrade-schemaservice runsbin/start-uc-server --upgrade-schemabefore the server starts, as the Helm chart's init container does. Like the chart's, it gets the database password in its environment but not the credential encryption key, which the schema upgrade doesn't read; the key file does sit in the configuration volume it mounts.storage-initrunsbin/ucto register RustFS's keys as ans3_compatible_access_keystorage credential, ands3://uc-warehouseas an external location on RustFS's endpoint,http://rustfs:9000, as [Server][CLI] Finalize S3-compatible storage: endpoint and path style on the external location #2289 has it. The location uses path-style requests, since a virtual-hosted address such asuc-warehouse.rustfsdoesn't resolve on the Compose network.http://rustfs:9000with path-style access.storage-initwaits for the server, then updates an existing credential and location to the current settings. That re-encrypts the credential with the current key and picks up changed RustFS keys.config-initwaits for RustFS andstorage-initfor the server, for about two minutes each. A wait that times out prints its last attempt's error, so wrong RustFS keys or a CLI that can't start show up as themselves rather than as a slow start.storage-init, and with it the UI.NOT_FOUND. Any other lookup failure stops it with the CLI's error, rather than trying a create that would fail with a misleading "already exists". Each lookup and write must also return JSON naming the entity, because the CLI exits 0 when it rejects its arguments; otherwisestorage-initfails and the bridge doesn't start./etc/hostsline for an engine on the host, which works while RustFS keeps its default port, 9000.UC_SERVER_CREDENTIAL_ENCRYPTION_KEY, the variable the Helm chart sets fromserver.credentialEncryptionKeySecret. Export it to use your own key. Left empty, the server uses a key thatconfig-initgenerates once into the configuration volume, so no key is committed anddocker compose down --volumesresets the key and the credential together. The key is written with mode 600 beside its final name and renamed into place, so an interrupted run can't leave a partial key behind. If the key file is missing, the server's launcher says so and points toconfig-init.UI_AUTH_ENABLEDdefaults to off to match. The README points to the remote file for trying sign-in.upgrade-schemaandstorage-initreuse the server image. All three services that use it share one definition of it withpull_policy: never, sodocker compose upbuilds the image when it's missing, without first trying to pull it, and doesn't rebuild it otherwise.restart: unless-stopped. They come back after a Docker daemon restart, and the server comes back by itself if it starts before PostgreSQL is ready, as it can underdocker compose restart.stop_grace_period: 20s, above the 15 secondsdocs/server/configuration.mdasks for with default settings.STOPSIGNAL SIGINT. Itsstop_grace_period: 35slets an in-flight RPC reach the bridge's 30-second Unity Catalog timeout.stop_grace_period: 35s, so an RPC it is proxying also gets to the bridge's timeout.pg_isready -h 127.0.0.1), the way the server connects. On a new volume the image first runs a setup server that listens only on the Unix socket, which a socket probe would report as ready.ui-new/docker-compose-remote.yaml: bridge and web only. It runs against the Unity Catalog server named byUC_SERVER, with auth on by default.127.0.0.1unlessBIND_ADDRESSis set. In the default file, Unity Catalog's authorization is off, and PostgreSQL and RustFS use default credentials unlessPOSTGRES_PASSWORD,RUSTFS_ACCESS_KEYandRUSTFS_SECRET_KEYare set.ui-new/server/Dockerfileruns as a non-root user ondebian:bookworm-slimand has a/healthzhealth check. The binary is owned by root, so that user can run it but not replace it, and the image stops it with SIGINT.ui-new/web/Dockerfileserves the SPA from unprivileged Nginx 1.30, the current stable branch. The build ignoresweb/*.local, so a checkout's local Vite settings, such asVITE_API_BASEinweb/.env.local, never reach the image.ui-new/protoduring the build, so a fresh checkout builds without runningbuffirst (web/src/genis gitignored). The web image uses thebufthatbun.lockpins (1.72.0), and the bridge image uses the same version.Dockerfileand the Helm chart are. RustFS is 1.0.4, the digest the server's RustFS tests use.ui-new/web/nginx.conf)./uc.v1.*,/config, and/healthzto the bridge. It looks the bridge up through Docker's DNS, at most 10 seconds apart, so a recreated bridge container is found at its new address. The read timeout is 35 s, just above the bridge's 30 s upstream limit.index.htmlfor client-side routes, and caches hashed/assets/as immutable.NPM_REGISTRY_URL,CARGO_REGISTRY_URL,MAVEN_PROXY_URL(forwarded to the rootDockerfile), or an optionalCARGO_CONFIG_FILEBuildKit secret. The secret is mounted where Cargo reads it, so it never lands in a layer, andCARGO_REGISTRY_URLbecomescargo --configflags.ui-new/web/bun.lockfix. Since [UI] Scaffold /ui-new for the new console experience #1902 the lockfile has pinned 447 packages to an internal npm proxy (npm-proxy.cloud.databricks.com). That breaksbun install --frozen-lockfileanywhere the proxy isn't reachable, including inside these images.clean-bun-lockscript. Only the resolution field changes; versions and integrity hashes don't.clean-bun-lock.ts --checkonui-new/web, as it does forui/.postinstall. Bun saves the lockfile before it runs the rootpostinstall, sobun install,bun addandbun updateleave no URLs to stage, with no per-clone hook to install. The web image copies the script in before its install.--checkmessage now names the right script, and the header says the script runs as thepostinstall.ui-new-containersjob in the lint workflow, "Check ui-new container files", runs:shellcheckon the container scripts and their testseach script's test in the image the script runs in:
config-init-test.shin the AWS CLI image the Compose file names (Amazon Linux, whereshis bash), and the others in the Alpine base of the server image, read from the rootDockerfile(busyboxsh)config-init-test.sh, which runsconfig-init.shagainst stand-ins for the AWS CLI,chownandsleepand temporary directories. It checks:chown, that the volume goes to100:101config-init.shtakesCONF_DIRandTEMPLATES_DIRfor this, with the Compose paths as defaults.start-server-test.sh, which checks that the key variable wins over the key file, that the file is used when the variable is empty, and that a missing or empty key file stops the launcherstorage-init-test.sh, which runsstorage-init.shagainst a stand-inbin/ucfor each answer the CLI can give. It checks the writes, their arguments and the exit status, including:The stand-in takes only the options the CLI lists for each command, read from the CLI's option table in
CliUtils.javaandCliParams.java. For any other option, or a missing required one, it prints help and exits 0, as the CLI does; it also refuses an option without its leading--, which the CLI would ignore. A check simulates the CLI no longer taking the location's--endpoint, and a renamed command, or a table the test can't read, fails the test with a message naming the CLI file. A comment aboveCliUtils.cliOptionssays the test reads it.docker compose configon both Compose filesui-new/README.mdandui-new/AGENTS.mdnow cover:buf.buildfor the protovalidate module even when registry mirrors are setBIND_ADDRESSand the registry variablesdownandup, and whatdocker compose restartdoes insteadRUSTFS_ACCESS_KEY,RUSTFS_SECRET_KEY,POSTGRES_PASSWORD), the fixed bucket, the encryption key, and reaching RustFS from the hostupgrade-schemaorstorage-initon their ownrustfsandrustfs_warehousebelong to the stack, and that theuc_confanduc_postgres_datavolumes are kept or removed togetherstorage-init, and where to look when it failsUC_SERVERcan't be a hostlocalhostURL, and that with auth on and no provider set, the sign-in page offers only pasting a tokenUI_AUTH_ENABLEDgates only the UI, not Unity Catalog's own port, and that the RustFS secret key shows in the process list whilestorage-initrunsstorage-root.tablesis a fallback for tables onlyTesting
All runs used clean volumes under separate Compose projects. The web and bridge code haven't changed across this branch's revisions.
On this commit:
sh, Debian'sdashand busybox: 19 checks forconfig-init, 4 forstart-serverand 10 forstorage-init.config-init.sh: the test fails against each one:web/.env.localsettingVITE_API_BASE, a plainbun run buildbakes that address into the bundle, and so does the image build without the new ignore line. With it, the address is absent from the image.config-init,upgrade-schemaandstorage-initexited 0.100:101, each overridden key had one value, there were no temporary files, and the key was mode 600.http://rustfs:9000, path-style.On earlier revisions of this branch:
config-initregenerating the key on every runconfig-initrenaming every leftover temporary fileconfig-initleaving the key world-readablestart-serverpreferring the key file over the variablestorage-initwith its JSON name check disableddocker compose upandup --buildbuild it without trying to pull it. With every image present, plainupneither pulls nor builds.POSTGRES_PASSWORD. Every service became healthy, andconfig-init,upgrade-schemaandstorage-initexited 0.UC_STORAGE_BUCKETno longer changes the rendered Compose configuration.mainwith [Server][CLI] Finalize S3-compatible storage: endpoint and path style on the external location #2289: I rebuilt the server image from the branch merged withmainand started a fresh stack.s3_compatible_access_keywith the role, and the location hadendpointhttp://rustfs:9000andpath_style_accesstrue.s3://uc-warehouse/demo, a schema and a managed volume, then vendedWRITE_VOLUMEcredentials. They carried a session token, and theirexternal_location_settingsnamedhttp://rustfs:9000,us-east-1and path-style access.AccessDenied./configandListCatalogsanswered, with the new catalog listed.storage-initre-run updated the credential and the location, exited 0, and vending still worked.docker compose stop bridgeended it with exit code 0 and its "shutting down" log line; the image withoutSTOPSIGNALexits 143 with no log line.deadline_exceededat the 30-second timeout rather than a dropped connection, and the bridge then exited 0.--dry-run up --buildwith the server image absent builds it once and pulls nothing.CARGO_CONFIG_FILEsecret worked, and a deliberately broken secret failed the build with Cargo naming/usr/local/cargo/config.toml, which shows the mounted file is what Cargo reads.rustfs-init) on its own before anything else. The volume and every file in it ended up100:101. The generated key was mode 600 and decoded to exactly 32 bytes, and no temporary file was left. The server then started and wrote its signing keys.server.propertiesdiffers from the template only inserver.authorization=disableand the table storage root.server.authorization-urlis kept.hibernate.properties, and neitherupgrade-schemanor the server logged the deprecation warning about it./configand/healthzresponded, a deep link served the SPA, and hashed assets came back with one header,Cache-Control: public, max-age=31536000, immutable.webmid-RPC. With the old 10-second default, the RPC was cut at 13 s and the container was killed (exit 137). With 35 s, the RPC finished with the bridge's timeout response at 30 s, and the container exited 0.storage-initre-run: a second run loggedupdating credential rustfsandupdating external_location rustfs_warehouse, and exited 0.s3://uc-warehouse/__unitystorage/tables/<id>. An Iceberg REST create also succeeded, and the server wrote its metadata file into RustFS.docker compose stopended it with exit code 143 (SIGTERM), not 137.UC_SERVER_CREDENTIAL_ENCRYPTION_KEYexported.storage-initran again after it, re-encrypted the credential with the new key, and vending still worked.docker compose restart, which restarts every service at once, three times. Each time, the setup service andstorage-initexited 0, the server kept serving the PostgreSQL catalog, and both config files kept their overrides./configand RPCs with 200./configreported auth on, and a signed-outListCatalogsreturnedunauthenticated.127.0.0.1, and both containers hadrestart: unless-stopped.upon a separate project resolved every image by its digest. All services came up healthy, and the UI, a deep link,/configandListCatalogsanswered 200.clean-bun-lock.ts --checkfails, and stripping the 447 URLs gives exactly this PR's lockfile. With thepostinstall:bun installthrough the proxy left the lockfile unchangedbun addthat wrote 448 proxy URLs left nonebun remove, the lockfile matched this PR's bytesui-newchecks: the web and bridge checks pass:bun run typecheckbun run test:coverage(193 tests, 95.4% lines)bun run buildbun run test:formatcargo test(57 tests)cargo fmt --checkCompatibility
No API, protobuf, or application code changes. The rest is:
ui-new/ui-newdocsclean-bun-lock.tspostinstallscript inui-new/web/package.json, a lint workflow step, and a new lint workflow jobexamples/cli'sCliUtils.javaThe local stack's server settings go only into its own generated configuration;
etc/confis unchanged.Follow-ups
Stack
This is the base of the remaining
ui-newstack. Next is the optional client-side request validation branch (chore/add-ui-web-validation-tests), which builds on these Compose files.This pull request and its description were written by Isaac.