Skip to content

Commit e672b48

Browse files
d-bytebaseclaude
andauthored
chore: delete demo mode (#20393)
* chore: delete demo mode 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> * fix: address codex review on demo deletion PR 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> * fix(e2e): skip enterprise-gated specs when no license is provided 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> * fix(e2e): provision dba1 fixture user during bootstrap 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> * fix(e2e): correct actuator-info path to /v1/actuator/info 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> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 8d95a6e commit e672b48

54 files changed

Lines changed: 263 additions & 6193 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-push-cloud-image.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ jobs:
5050
build-args: |
5151
VERSION=cloud
5252
GIT_COMMIT=${{ env.GIT_COMMIT }}
53-
RELEASE=release
5453
5554
- name: Get GKE credentials
5655
uses: google-github-actions/get-gke-credentials@v3

.github/workflows/build-push-demo-image.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

.github/workflows/demo-daily-deploy.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<p align="center">
1313
<a href="https://docs.bytebase.com/get-started/self-host-vs-cloud" target="_blank">⚙️ Install</a> •
1414
<a href="https://docs.bytebase.com">📚 Docs</a> •
15-
<a href="https://demo.bytebase.com">🎮 Demo</a> •
1615
<a href="https://discord.gg/huyw7gRsyA">💬 Discord</a> •
1716
<a href="https://www.bytebase.com/request-demo/">🙋‍♀️ Book Demo</a>
1817
</p>

action/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ These flags apply to the main `bytebase-action` command and its subcommands (`ch
3535
- For `check` command: outputs detailed check results including advices, affected rows, and risk levels
3636
- For `rollout` command: outputs created resource names (release, plan, rollout)
3737

38-
- **`--url`**: The Bytebase instance URL.
39-
- Default: `https://demo.bytebase.com`
38+
- **`--url`**: The Bytebase instance URL. Required.
4039

4140
- **`--service-account`**: The service account email.
4241
- Default: `""` (empty string). If not provided via flag, reads from the `BYTEBASE_SERVICE_ACCOUNT` environment variable.

action/command/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func NewRootCommand(w *world.World) *cobra.Command {
2626
}
2727
// bytebase-action flags
2828
cmd.PersistentFlags().StringVar(&w.Output, "output", "", "Output file location. The output file is a JSON file with the created resource names")
29-
cmd.PersistentFlags().StringVar(&w.URL, "url", "https://demo.bytebase.com", "Bytebase URL")
29+
cmd.PersistentFlags().StringVar(&w.URL, "url", "", "Bytebase URL (required)")
3030
cmd.PersistentFlags().DurationVar(&w.Timeout, "timeout", 120*time.Second, "HTTP timeout for API requests (e.g. 120s, 5m)")
3131
cmd.PersistentFlags().StringVar(&w.ServiceAccount, "service-account", "", "Bytebase Service account")
3232
cmd.PersistentFlags().StringVar(&w.ServiceAccountSecret, "service-account-secret", "", "Bytebase Service account secret")

action/command/validation/flags.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,17 @@ func ValidateFlags(w *world.World) error {
4040
}
4141
}
4242

43-
// Validate URL format
43+
// Validate URL: must be a non-empty absolute URL.
44+
if w.URL == "" {
45+
return errors.Errorf("--url is required")
46+
}
4447
u, err := url.Parse(w.URL)
4548
if err != nil {
4649
return errors.Wrapf(err, "invalid URL format: %s", w.URL)
4750
}
51+
if u.Scheme == "" || u.Host == "" {
52+
return errors.Errorf("--url must be an absolute URL (e.g. https://bytebase.example.com), got %q", w.URL)
53+
}
4854
w.URL = strings.TrimSuffix(u.String(), "/") // update the URL to the canonical form
4955

5056
// Validate project format

backend/api/mcp/gen/openapi.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7921,10 +7921,6 @@ components:
79217921
type: boolean
79227922
title: saas
79237923
description: Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users.
7924-
demo:
7925-
type: boolean
7926-
title: demo
7927-
description: Whether the Bytebase instance is running in demo mode.
79287924
host:
79297925
type: string
79307926
title: host

backend/api/v1/actuator_service.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ func (s *ActuatorService) getServerInfo(ctx context.Context, workspaceID string)
133133
Version: s.profile.Version,
134134
GitCommit: s.profile.GitCommit,
135135
Saas: s.profile.SaaS,
136-
Demo: s.profile.Demo,
137136
LastActiveTime: timestamppb.New(time.Unix(s.profile.LastActiveTS.Load(), 0)),
138137
Docker: s.profile.IsDocker,
139138
ExternalUrlFromFlag: s.profile.ExternalURL != "",

backend/bin/server/cmd/profile.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ func getBaseProfile(dataDir string) *config.Profile {
1919
Debug: flags.debug,
2020
IsDocker: isDocker(),
2121
DataDir: dataDir,
22-
Demo: flags.demo,
2322
Version: version,
2423
GitCommit: gitcommit,
2524
PgURL: os.Getenv("PG_URL"),

0 commit comments

Comments
 (0)