Skip to content

feat(playground): run ExtendDB on DocumentDB - #454

Draft
xgerman wants to merge 3 commits into
documentdb:mainfrom
xgerman:geeichbe/extenddb-documentdb-playground
Draft

feat(playground): run ExtendDB on DocumentDB#454
xgerman wants to merge 3 commits into
documentdb:mainfrom
xgerman:geeichbe/extenddb-documentdb-playground

Conversation

@xgerman

@xgerman xgerman commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add an ExtendDB playground backed by a DocumentDB Kubernetes deployment
  • configure ExtendDB transaction reads to use majority, since DocumentDB does not support snapshot read concern
  • provide build, deployment, cleanup, IAM setup, and demo instructions
  • support container builds from either upstream or a local ExtendDB working tree
  • exercise CRUD, TransactWriteItems, and TransactGetItems in the smoke test

Validation

  • built the MongoDB-backend image from the local ExtendDB PR branch
  • deployed DocumentDB and ExtendDB in isolated temporary namespaces
  • verified CreateTable, PutItem, GetItem, UpdateItem, DeleteItem, TransactWriteItems, and TransactGetItems
  • confirmed no CommandNotSupported / read-concern error 115 failures
  • bash -n passed for all playground scripts
  • Kubernetes manifests passed client-side dry-run validation

Related

German Eichberger and others added 3 commits August 12, 2026 10:30
Adds documentdb-playground/extenddb/, a playground demonstrating
ExtendDB (open-source DynamoDB wire-protocol server) configured with
its MongoDB storage backend pointed at a DocumentDB cluster, giving a
DynamoDB-compatible API surface backed by DocumentDB.

Includes:
- Dockerfile building ExtendDB from source with the mongodb feature
  (no official Mongo-backend image is published upstream)
- Kubernetes manifests: namespace/PVC, one-shot init Job, serve
  Deployment + Service
- scripts/ for build, deploy, connectivity smoke test, and cleanup
- demo/demo.py: small boto3 walkthrough of the classic DynamoDB
  Movies table
- README covering architecture, quick start, config, the ddbsh
  interactive shell, and troubleshooting (notably the
  directConnection/replicaSet=rs0 interaction with DocumentDB's
  gateway)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 73ace353-38c7-44b2-8a9f-0ee833727c53
Signed-off-by: German Eichberger <geeichbe@microsoft.com>
…ve testing

Fixes found by deploying and testing this playground end-to-end against a
real DocumentDB instance (kind cluster) with the actual ExtendDB binary,
following up on a rubber-duck review of the original implementation:

- deploy.sh: strip replicaSet=rs0 from the connection string (matching
  lightrag/keda-autoscaling). A prior mongosh-based test suggested keeping
  it was safe with directConnection=true, but the real ExtendDB Rust
  mongodb v3 driver strictly validates the requested replica set name and
  rejects the gateway's response even in direct-connection mode.
- deploy.sh: append tlsAllowInvalidCertificates=true -- the Rust driver's
  default certificate verifier rejects DocumentDB's self-signed gateway
  cert with UnknownIssuer.
- deploy.sh: restrict envsubst substitution to explicit variable lists so
  it stops blanking out unrelated variable references in the manifests.
- deploy.sh: capture full init Job logs with a fallback so admin
  credentials (printed once) are never silently lost by a failed keyword
  grep.
- manifests/init-job.yaml: extenddb init --backend mongodb reads the Mongo
  connection string from the --config file itself, not from the
  connection-string env var override (that override only applies at
  serve time) -- write a seed TOML first, then run init --overwrite. Use
  bash instead of sh (dash doesn't support set -o pipefail).
- manifests/init-job.yaml, manifests/serve.yaml: set HOME to the PVC state
  dir so the self-signed TLS cert/key extenddb init generates under the
  home-relative .extenddb/tls/ path land on the PVC-backed state dir
  instead of the init Job's ephemeral container home dir, so the separate
  serve Deployment pod can find them.
- manifests/init-job.yaml, manifests/serve.yaml: add securityContext
  (runAsUser/runAsGroup/fsGroup 10001) so the non-root container can
  reliably write to the PVC regardless of the CSI driver's default mount
  ownership.
- manifests/init-job.yaml: add ttlSecondsAfterFinished to release the
  shared ReadWriteOnce PVC promptly.
- manifests/serve.yaml: document the readiness/liveness probe caveat --
  extenddb healthcheck doesn't verify backend connectivity.
- Dockerfile: install libssl3 in the runtime stage defensively.
- demo.py: use Decimal instead of float literals -- boto3's DynamoDB
  resource rejects native Python floats.
- README: document a confirmed, currently-blocking upstream compatibility
  gap -- ExtendDB's MongoDB backend unconditionally uses MongoDB's
  snapshot read concern for CreateTable/PutItem/etc., which this
  operator's DocumentDB gateway does not support (Error code 115:
  CommandNotSupported). CreateTable succeeds; PutItem and most other
  data-plane operations currently fail with InternalServerError. Also
  documents the extenddb manage create-account/create-user/
  put-user-policy/create-access-key workflow needed to get a SigV4 access
  key (the init admin credentials are management-API only, not a SigV4
  key), and updates the replicaSet/directConnection troubleshooting
  writeup with the corrected, doubly-verified explanation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 73ace353-38c7-44b2-8a9f-0ee833727c53
Signed-off-by: German Eichberger <geeichbe@microsoft.com>
Configure majority transaction reads, add local-source image builds, and expand the playground smoke test to cover CRUD and transactional operations.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c9b74922-c628-425e-bf1b-484b223c52b5
Signed-off-by: German Eichberger <geeichbe@microsoft.com>
@documentdb-triage-tool documentdb-triage-tool Bot added documentation Improvements or additions to documentation ecosystem enhancement New feature or request labels Sep 2, 2026
@documentdb-triage-tool

Copy link
Copy Markdown

🤖 Auto-triaged by documentdb-triage-tool.

Applied: ecosystem, documentation, enhancement
Project fields suggested: Component playground · Priority P2 · Effort L · Status In Progress
Confidence: 0.88 (mixed)

Reasoning

component from path globs (playground, docs); effort from diff stats (1235+0 LOC, 12 files); LLM: Adds a new ExtendDB-backed playground with multi-file changes spanning build scripts, Kubernetes manifests, IAM setup, smoke tests, and read-concern configuration.

If a label is wrong, remove it manually and ping @patty-chow so the rules can be tuned. The bot will not re-label items that already have component labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation ecosystem enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant