Skip to content

feat: unify Docker image by removing SageMaker variant#1773

Draft
kmcginnes wants to merge 4 commits into
mainfrom
remove-sagemaker-docker-image
Draft

feat: unify Docker image by removing SageMaker variant#1773
kmcginnes wants to merge 4 commits into
mainfrom
remove-sagemaker-docker-image

Conversation

@kmcginnes
Copy link
Copy Markdown
Collaborator

@kmcginnes kmcginnes commented May 20, 2026

Description

All client requests now always route through the same-origin proxy server using relative URLs. Users no longer need to configure a "Public or Proxy Endpoint" — the connection form simplifies to just the database URL and optional IAM settings.

This also eliminates the separate SageMaker Docker build. One image serves all deployment modes (standalone, SageMaker, arbitrary reverse proxies) without build-time path configuration.

Key changes:

  • Client resolves API endpoints via new URL("../endpoint", document.baseURI) — works behind any reverse proxy without configuration
  • Removes url (proxy endpoint) and proxyConnection toggle from the connection model; graphDbUrl is now the single required field
  • Proxy headers (graph-db-connection-url) are always sent — no toggle needed
  • NEPTUNE_NOTEBOOK=true becomes a runtime-only preset (port 9250, cloudwatch logs, SSL off)
  • CI builds one image, publishes under both regular and sagemaker-* tags during transition
  • Legacy stored connections auto-migrate on read via migrateLegacyConnection()

Breaking change

All database requests now flow through the proxy server. Deployments where the server is in a restricted network (e.g., a private subnet without a NAT gateway) will not be able to reach databases outside that network, even if the user's browser previously could via direct connections. Users in this scenario need to add appropriate network routing (VPC peering, NAT gateway, etc.).

Validation

  • All 1709 existing tests pass
  • Zero TypeScript errors across all packages
  • Zero lint errors
  • Tested on SageMaker Neptune Notebook (aws-neptune-gx-air-routes) — connections work with no lifecycle script changes
  • Manual testing:
    • Deploy behind SageMaker reverse proxy at /proxy/9250/explorer/, verify relative URLs resolve correctly
    • Existing lifecycle script passes legacy env vars (PUBLIC_OR_PROXY_ENDPOINT, USING_PROXY_SERVER) — silently ignored
    • Create/edit connections in UI, verify form shows only Graph Connection URL + IAM fields
    • Import legacy connection file (with url/proxyConnection), verify migration works

Related Issues

Check List

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I have verified pnpm checks passes with no errors.
  • I have verified pnpm test passes with no failures.
  • I have covered new added functionality with unit tests if necessary.
  • I have updated documentation if necessary.

kmcginnes added 4 commits May 19, 2026 19:58
Documents the decision to eliminate the separate SageMaker Docker image
build in favor of a single image with runtime configuration.
Eliminate the separate SageMaker Docker build by switching the client to
relative API paths and always routing through the proxy server. This
halves CI Docker time, removes user-facing proxy configuration, and
makes the app work behind any reverse proxy without build-time config.

Key changes:
- Remove `url` and `proxyConnection` from ConnectionConfig; `graphDbUrl`
  is now the single required field
- Add `apiUrl()` utility resolving endpoints relative to document.baseURI
- Explorers use relative URLs via injectable baseURI parameter
- `fetchDatabaseRequest` always sends graph-db-connection-url header
- `defaultConnection.ts` uses single relative fetch (no SageMaker fallback)
- Vite base changed to "./" with <base href="./"> in index.html
- Connection form simplified: removed proxy endpoint/toggle fields
- Dockerfile removes ARG NEPTUNE_NOTEBOOK and conditional ENV logic
- process-environment.sh: NEPTUNE_NOTEBOOK=true writes port/log-style
  at runtime instead of build-time
- CI builds one image, publishes under both regular and sagemaker-* tags
- Legacy stored connections migrated via migrateLegacyConnection()
Remove references to PUBLIC_OR_PROXY_ENDPOINT, USING_PROXY_SERVER, and
GRAPH_EXP_ENV_ROOT_FOLDER from configuration docs and deployment guides.
Simplify connection setup instructions to reflect the single
GRAPH_CONNECTION_URL field. Remove legacy fields from the
DefaultConnectionDataSchema since they are no longer produced.
All requests now flow through the proxy server, so the server must have
network access to the target database. This is a known limitation for
deployments in restricted networks (e.g., private subnets without NAT).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unify Docker image: remove separate SageMaker build

1 participant