chore: delete demo mode#20393
Conversation
Removes the --demo server flag and everything it pulled in: backend/demo package + dump.sql, demo banner/badge/signin form, demo locale keys, "bool demo" actuator proto field (reserved 5), --minidemo build tag, and the GitHub workflows that built/deployed the demo image. Rewrites the e2e bootstrap to replace --demo's pre-populated admin and sample instances with /v1/auth/signup followed by /v1/actuator:setupSample, with TCP readiness probes on the sample Postgres ports. Drops the bytebase-action default --url of https://demo.bytebase.com (now required). Removes the RELEASE Docker build arg since the only remaining caller was already passing RELEASE=release. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest Buf updates on your PR. Results from workflow Proto linter / lint-protos (pull_request).
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 98a394834b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
P2: reject empty --url at flag-validation time in bytebase-action with a clear error, instead of falling through to a confusing network failure. Also requires the URL to be absolute (scheme + host). P1: install an enterprise license during e2e bootstrap when the BYTEBASE_E2E_LICENSE env var is set, via PATCH /v1/subscription/license. Without the env var the bootstrap warns and continues on free plan, so masking/classification specs can opt in once a dev license is provided out of band. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dc149d43d5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Codex flagged that the previous fix still let masking specs run on free plan and fail. Plumb env.hasLicense through the bootstrap, and have masking-exemption.spec.ts skip itself in beforeAll when no license is present, instead of failing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 33c47d1a3e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Codex flagged that the new bootstrap dropped the demo dump's pre-seeded dba1@example.com user, which two plan-detail specs use as a second approver. Add createUser + addWorkspaceRoleMember helpers and create dba1@example.com with workspaceDBA role after admin signup. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ea0436a6d4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Codex caught that getActuatorInfo() requested /v1/actuator, but the gateway only exposes GetActuatorInfo at /v1/actuator/info. The bootstrap hits this unconditionally before provisioning the DBA fixture, so the whole e2e suite would 404 on clean environments. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|



Summary
Removes Bytebase's
--demomode end-to-end. The demo server (demo.bytebase.com) was driven by a baked-in SQL dump plus a server flag that loaded it on startup; this PR rips out the flag, the dump, the deploy workflow, and every UI surface that branched onserverInfo.demo.48 files net, ~6,100 lines removed.
What goes away
--demoCLI flag,Profile.Demofield,demo.LoadDemoData(),pgdata-demodata dirbackend/demo/package (Go code + 5.5K-linedata/dump.sql)bool demo = 5fromActuatorInfoproto (field 5 reserved)BannerDemo,DemoSigninForm, demo badge inVersionMenuItem,isDemostore getterauth.sign-in.demo-account,common.demo-mode,banner.request-demo,banner.cloud,banner.deploylocale keys//go:build !minidemotag onultimate.go; mergedminimal.gointo it.github/workflows/build-push-demo-image.yml+demo-daily-deploy.ymlbytebase-actiondefault--url https://demo.bytebase.com(now empty, required)RELEASEDocker build arg (the only remaining caller passedRELEASE=release, same as the default — see below)mkdir /var/opt/bytebase/pgdata-demoinscripts/Dockerfiledemo.bytebase.comlink inREADME.mdE2E bootstrap rewrite
frontend/tests/e2e/framework/mode-start-new-bytebase.tspreviously relied on--demoto pre-populate an admin and sample instances. New flow:--demo)/healthzPOST /v1/auth/signup— first user becomes workspace admin automaticallyPOST /v1/auth/login— get a body token (signup only sets cookies)POST /v1/actuator:setupSample— provisionstest-sample-instance+prod-sample-instanceonPORT+3/PORT+4listInstances()PORT+3/PORT+4until they accept connectionsNew
pollUntil()helper captures the last error per phase so timeout failures surface the underlying cause instead of a generic "did not become ready" message.Breaking Changes
--demoserver flag removed. Bytebase will fail to start withunknown flag: --demo. No replacement — the demo mode is gone.ActuatorInfo.demo(field 5) removed; field reserved. Existing clients readingserverInfo.demowill get the default (false).bytebase-action --urldefault changed fromhttps://demo.bytebase.comto empty. The flag is now required.RELEASEDocker build arg removed. Builds now always use thereleasetag.minidemoGo build tag removed. Builds always include all DB drivers.frontend/tests/e2e/AGENTS.mdnotes a new gap: the freshly signed-up workspace runs on the free plan, so specs that exercise enterprise-gated features (masking, classification) must inject a license viaPATCH /v1/subscription/licensesigned withLICENSE_PRIVATE_KEY. The previous demo dump baked the license in.Test plan
go build -ldflags "-w -s" -p=16 -o ./bytebase-build/bytebase ./backend/bin/server/main.gogo build -tags "release,embed_frontend,docker"(matches new Dockerfile tags)golangci-lint run --allow-parallel-runners— 0 issuespnpm --dir frontend fix— cleanpnpm --dir frontend type-check— cleanpnpm --dir frontend test— 2021 passed (1 obsoleteBannerDemotest removed)playwright test --list— 47 specs enumerate🤖 Generated with Claude Code