Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: change occurrence of "bytebase" to "Bytebase" (#1663)
Yilong Li6f723581a0fc
diff --git a/Dockerfile b/Dockerfileindex 681d3587db..a066be2801 100644--- a/Dockerfile+++ b/Dockerfile@@ -75,7 +75,7 @@ COPY --from=backend /etc/ssl/certs /etc/ssl/certs# - Demo script to launch Bytebase in readonly demo modeCOPY ./scripts /usr/local/bin/-# Create bytebase user for running Postgres database and server.+# Create user "bytebase" for running Postgres database and server.RUN addgroup --gid 113 --system bytebase && adduser --uid 113 --system bytebase && adduser bytebase bytebase# Directory to store the data, which can be referenced as the mounting point.diff --git a/Dockerfile.render b/Dockerfile.renderindex 5b8129f06a..def7833565 100644--- a/Dockerfile.render+++ b/Dockerfile.render@@ -72,7 +72,7 @@ COPY --from=backend /backend-build/bytebase /usr/local/bin/# - Demo script to launch Bytebase in readonly demo modeCOPY ./scripts /usr/local/bin/-# Create bytebase user for running Postgres database and server.+# Create user "bytebase" for running Postgres database and server.RUN addgroup --gid 113 --system bytebase && adduser --uid 113 --system bytebase && adduser bytebase bytebase# Directory to store the data, which can be referenced as the mounting point.diff --git a/Dockerfile.render-preview b/Dockerfile.render-previewindex c1849fa1e4..95ffabbbe8 100644--- a/Dockerfile.render-preview+++ b/Dockerfile.render-preview@@ -74,7 +74,7 @@ COPY --from=backend /backend-build/bytebase /usr/local/bin/# - Demo script to launch Bytebase in readonly demo modeCOPY ./scripts /usr/local/bin/-# Create bytebase user for running Postgres database and server.+# Create user "bytebase" for running Postgres database and server.RUN addgroup --gid 113 --system bytebase && adduser --uid 113 --system bytebase && adduser bytebase bytebase# Directory to store the data, which can be referenced as the mounting point.diff --git a/bin/bb/README.md b/bin/bb/README.mdindex e13d92ea97..7ad34f0be7 100644--- a/bin/bb/README.md+++ b/bin/bb/README.md@@ -1,4 +1,4 @@-# bb - the bytebase CLI+# bb - the Bytebase CLI## Supported database enginesdiff --git a/bin/server/cmd/root.go b/bin/server/cmd/root.goindex 18e1385d3d..c2ba5efe9a 100644--- a/bin/server/cmd/root.go+++ b/bin/server/cmd/root.go@@ -72,7 +72,7 @@ ________________________________________________________________________________// -----------------------------------Command Line Config BEGIN------------------------------------var (flags struct {- // Used for bytebase command line config+ // Used for Bytebase command line confighost stringport intfrontendHost string@@ -117,13 +117,13 @@ func init() {rootCmd.PersistentFlags().IntVar(&flags.port, "port", 80, "port where Bytebase backend is accessed from. This is also used by Bytebase to create the webhook callback endpoint for VCS integration")rootCmd.PersistentFlags().StringVar(&flags.frontendHost, "frontend-host", "", "host where Bytebase frontend is accessed from, must start with http:// or https://. This is used by Bytebase to compose the frontend link when posting the webhook event. Default is the same as --host")rootCmd.PersistentFlags().IntVar(&flags.frontendPort, "frontend-port", 0, "port where Bytebase frontend is accessed from. This is used by Bytebase to compose the frontend link when posting the webhook event. Default is the same as --port")- rootCmd.PersistentFlags().StringVar(&flags.dataDir, "data", ".", "directory where Bytebase stores data. If relative path is supplied, then the path is relative to the directory where bytebase is under")+ rootCmd.PersistentFlags().StringVar(&flags.dataDir, "data", ".", "directory where Bytebase stores data. If relative path is supplied, then the path is relative to the directory where Bytebase is under")rootCmd.PersistentFlags().BoolVar(&flags.readonly, "readonly", false, "whether to run in read-only mode")rootCmd.PersistentFlags().BoolVar(&flags.demo, "demo", false, "whether to run using demo data")rootCmd.PersistentFlags().BoolVar(&flags.debug, "debug", false, "whether to enable debug level logging")// TODO(tianzhou): this needs more bake time. There are couple blocking issues:- // 1. Currently, we will create a separate bytebase database to store the migration_history table, we need to put it inside the specified database here.- // 2. We need to move the logic of creating bytebase metadata db logic outside. Because with --pg option, the db has already been created.+ // 1. Currently, we will create a separate database "bytebase" to store the migration_history table, we need to put it inside the specified database here.+ // 2. We need to move the logic of creating Bytebase metadata db logic outside. Because with --pg option, the db has already been created.rootCmd.PersistentFlags().StringVar(&flags.pgURL, "pg", "", "optional external PostgreSQL instance connection url(must provide dbname); for example postgresql://user:secret@masterhost:5432/dbname?sslrootcert=cert")}diff --git a/docs/code-review-guide.md b/docs/code-review-guide.mdindex 5c98f9694e..44c2478de8 100644--- a/docs/code-review-guide.md+++ b/docs/code-review-guide.md@@ -25,7 +25,7 @@ Please read and follow [Google's Code Review Guideline](https://google.github.io# Tools-- Install [Neat](https://neat.run/) to subscribe GitHub notification, make sure to watch the bytebase repository.+- Install [Neat](https://neat.run/) to subscribe GitHub notification, make sure to watch the Bytebase repository.- You can also try [graphite](https://graphite.dev/) which is a new code review tool for GitHub. One nice feature is it displays who should take the turn for each ongoing PR.diff --git a/docs/design/gh-ost-integration.md b/docs/design/gh-ost-integration.mdindex 987cb521c9..571831adb4 100644--- a/docs/design/gh-ost-integration.md+++ b/docs/design/gh-ost-integration.md@@ -2,7 +2,7 @@## Overview-Currently, bytebase runs DDL statements directly on databases. With this feature, users can choose to use gh-ost to migrate MySQL versions 5.6 or greater.+Currently, Bytebase runs DDL statements directly on databases. With this feature, users can choose to use gh-ost to migrate MySQL versions 5.6 or greater.### gh-ost: a brief introduction (quoted from gh-ost docs)@@ -231,7 +231,7 @@ Users can change the gh-ost configuration in the related issue tab.We will only support "connect to primary and migrate on primary" for now.-In the future, bytebase will support detecting primary and replicas. We may support "connect to replica" then.+In the future, Bytebase will support detecting primary and replicas. We may support "connect to replica" then.### Privileges@@ -411,7 +411,7 @@ type TaskDatabaseSchemaUpdateGhostDropOriginalTablePayload struct {#### How migration works now-Here's how bytebase executes migration now.+Here's how Bytebase executes migration now.1. `server/task_scheduler.go` schedules a migration task.2. `server/task_executor_schema_update.go` `func RunOnce()`diff --git a/docs/dev-guide.md b/docs/dev-guide.mdindex 6cfcd800ad..99a332d746 100644--- a/docs/dev-guide.md+++ b/docs/dev-guide.md@@ -14,7 +14,7 @@ Since git utilizes branches as a primary development pattern, we usually face thAfter forking the `bytebase/bytebase` repository, set up the git remote tracking.```bash-# clone your bytebase fork+# clone your Bytebase forkgit clone [email protected]:${YourGithubID}/bytebase.gitcd bytebase# setup upstream pointing to bytebase/bytebasediff --git a/frontend/src/components/Issue/IssueDetailLayout.vue b/frontend/src/components/Issue/IssueDetailLayout.vueindex c80d3a33a5..f5f6d56b83 100644--- a/frontend/src/components/Issue/IssueDetailLayout.vue+++ b/frontend/src/components/Issue/IssueDetailLayout.vue@@ -265,7 +265,7 @@ const instance = computed((): Instance => {const sqlHint = (): string | undefined => {if (!props.create && selectedMigrateType.value == "BASELINE") {- return `This is a baseline migration and bytebase won't apply the SQL to the database, it will only record a baseline history`;+ return `This is a baseline migration and Bytebase won't apply the SQL to the database, it will only record a baseline history`;}if (instance.value.engine === "SNOWFLAKE") {return `Use <<schema>>.<<table>> to specify a Snowflake table`;diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 3129c620fc..e06de64865 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -1226,7 +1226,7 @@"unknown-event": "Unexpeted event type, OAuth failed."},"subscription": {- "description": "You can upload your bytebase license to unlock team/enterprise features.",+ "description": "You can upload your Bytebase license to unlock team/enterprise features.","current": "Current plan","instance-count": "Instance count","expires-at": "Expires at",diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 9ea0301a26..24ad1da067 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -1226,7 +1226,7 @@"unknown-event": "未知的事件类型,认证失败"},"subscription": {- "description": "您可以在这里上传您购买的 bytebase 证书来解锁团队版/企业版功能。",+ "description": "您可以在这里上传您购买的 Bytebase 证书来解锁团队版/企业版功能。","current": "当前版本","instance-count": "实例数","expires-at": "过期时间",diff --git a/frontend/src/views/BannerSubscription.vue b/frontend/src/views/BannerSubscription.vueindex 90c8bf54a0..a0005a2f4a 100644--- a/frontend/src/views/BannerSubscription.vue+++ b/frontend/src/views/BannerSubscription.vue@@ -59,10 +59,10 @@ export default {const { t } = useI18n();const emailBody = [- "Hi bytebase support,\n",+ "Hi Bytebase support,\n","I request to extend the trialing time for another 14 days.","{please implement your reason to extend here}\n",- "My email in the bytebase hub account: {email}",+ "My email in the Bytebase hub account: {email}","My organization key: {orgKey}",].join("\n");diff --git a/plugin/db/pg/migrate.go b/plugin/db/pg/migrate.goindex bb5cc997d0..5c108557c2 100644--- a/plugin/db/pg/migrate.go+++ b/plugin/db/pg/migrate.go@@ -65,18 +65,18 @@ func (driver *Driver) SetupMigrationIfNeeded(ctx context.Context) error {if !driver.strictUseDb() {exist, err := driver.hasBytebaseDatabase(ctx)if err != nil {- log.Error("Failed to find bytebase database.",+ log.Error("Failed to find database \"bytebase\".",zap.Error(err),zap.String("environment", driver.connectionCtx.EnvironmentName),zap.String("database", driver.connectionCtx.InstanceName),)- return fmt.Errorf("failed to find bytebase database error: %v", err)+ return fmt.Errorf("failed to find database \"bytebase\", error: %v", err)}if !exist {// Create `bytebase` databaseif _, err := driver.db.ExecContext(ctx, createBytebaseDatabaseStmt); err != nil {- log.Error("Failed to create bytebase database.",+ log.Error("Failed to create database \"bytebase\".",zap.Error(err),zap.String("environment", driver.connectionCtx.EnvironmentName),zap.String("database", driver.connectionCtx.InstanceName),@@ -86,12 +86,12 @@ func (driver *Driver) SetupMigrationIfNeeded(ctx context.Context) error {}if err := driver.switchDatabase(db.BytebaseDatabase); err != nil {- log.Error("Failed to switch to bytebase database.",+ log.Error("Failed to switch to database \"bytebase\".",zap.Error(err),zap.String("environment", driver.connectionCtx.EnvironmentName),zap.String("database", driver.connectionCtx.InstanceName),)- return fmt.Errorf("failed to switch to bytebase database error: %v", err)+ return fmt.Errorf("failed to switch to database \"bytebase\", error: %v", err)}}diff --git a/plugin/db/sqlite/migrate.go b/plugin/db/sqlite/migrate.goindex 74efc2608d..5fa951bf2e 100644--- a/plugin/db/sqlite/migrate.go+++ b/plugin/db/sqlite/migrate.go@@ -57,12 +57,12 @@ func (driver *Driver) SetupMigrationIfNeeded(ctx context.Context) error {)if _, err := driver.GetDbConnection(ctx, bytebaseDatabase); err != nil {- log.Error("Failed to switch to bytebase database.",+ log.Error("Failed to switch to database \"bytebase\".",zap.Error(err),zap.String("environment", driver.connectionCtx.EnvironmentName),zap.String("database", driver.connectionCtx.InstanceName),)- return fmt.Errorf("failed to switch to bytebase database error: %v", err)+ return fmt.Errorf("failed to switch to database \"bytebase\", error: %v", err)}if _, err := driver.db.ExecContext(ctx, migrationSchema); err != nil {diff --git a/quickstart/README.md b/quickstart/README.mdindex df0b9e007f..2efed310ed 100644--- a/quickstart/README.md+++ b/quickstart/README.md@@ -105,7 +105,7 @@ Prerequisite:- Follow the tips on bytebase page to add application.+ Follow the tips on Bytebase page to add application.diff --git a/resources/mysql/mysql.go b/resources/mysql/mysql.goindex dd4642f66c..93eef243c9 100644--- a/resources/mysql/mysql.go+++ b/resources/mysql/mysql.go@@ -21,7 +21,7 @@ import (_ "github.com/go-sql-driver/mysql")-// Instance is MySQL instance installed by bytebase for testing.+// Instance is MySQL instance installed by Bytebase for testing.type Instance struct {// basedir is the directory where the mysql binary is installed.basedir stringdiff --git a/resources/postgres/postgres.go b/resources/postgres/postgres.goindex 6cb1b31982..15e9c6fd17 100644--- a/resources/postgres/postgres.go+++ b/resources/postgres/postgres.go@@ -209,7 +209,7 @@ func initDB(pgBinDir, pgDataDir, pgUser string) error {Credential: &syscall.Credential{Uid: uint32(uid)},}if err := os.Chown(pgDataDir, int(uid), int(gid)); err != nil {- return fmt.Errorf("failed to change owner to bytebase of data directory %q, error: %w", pgDataDir, err)+ return fmt.Errorf("failed to change owner of data directory %q to bytebase, error: %w", pgDataDir, err)}}@@ -226,12 +226,12 @@ func shouldSwitchUser() (int, int, bool, error) {if err != nil {return 0, 0, true, fmt.Errorf("failed to get current user, error: %w", err)}- // If user runs bytebase as root user, we will attempt to run as user `bytebase`.+ // If user runs Bytebase as root user, we will attempt to run as user `bytebase`.// https://www.postgresql.org/docs/14/app-initdb.htmlif bytebaseUser.Username == "root" {bytebaseUser, err = user.Lookup("bytebase")if err != nil {- return 0, 0, false, fmt.Errorf("Please run Bytebase as non-root user. You can use the following command to create a dedicated bytebase user to run the application: addgroup -g 113 -S bytebase && adduser -u 113 -S -G bytebase bytebase")+ return 0, 0, false, fmt.Errorf("please run Bytebase as non-root user. You can use the following command to create a dedicated \"bytebase\" user to run the application: addgroup --gid 113 --system bytebase && adduser --uid 113 --system bytebase && adduser bytebase bytebase")}sameUser = false}diff --git a/scripts/build.sh b/scripts/build.shindex 70ca971485..dcef74f10d 100755--- a/scripts/build.sh+++ b/scripts/build.sh@@ -29,7 +29,7 @@ fiecho "Start building Bytebase monolithic ${VERSION}..."echo ""-echo "Step 1 - building bytebase frontend..."+echo "Step 1 - building Bytebase frontend..."if command -v pnpm > /dev/nullthen@@ -38,10 +38,10 @@ elsenpm --prefix ./frontend run releasefi-echo "Completed building bytebase frontend."+echo "Completed building Bytebase frontend."echo ""-echo "Step 2 - building bytebase backend..."+echo "Step 2 - building Bytebase backend..."flags="-X 'github.com/bytebase/bytebase/bin/server/cmd.version=${VERSION}'-X 'github.com/bytebase/bytebase/bin/server/cmd.goversion=$(go version)'@@ -52,7 +52,7 @@ flags="-X 'github.com/bytebase/bytebase/bin/server/cmd.version=${VERSION}'# -ldflags="-w -s" means omit DWARF symbol table and the symbol table and debug informationgo build --tags "release" -ldflags "-w -s $flags" -o ${OUTPUT_BINARY} ./bin/server/main.go-echo "Completed building bytebase backend."+echo "Completed building Bytebase backend."echo ""echo "Step 3 - printing version..."diff --git a/scripts/demo.sh b/scripts/demo.shindex 47ab89a4a9..b7db3ccf42 100644--- a/scripts/demo.sh+++ b/scripts/demo.sh@@ -33,7 +33,7 @@ function seedDemoData(){echo "waiting..."sleep 1done- echo 'Sleep 120 seconds for bytebase to finish migration...'+ echo 'Sleep 120 seconds for Bytebase to finish migration...'sleep 120echo 'Killing seeding program'diff --git a/server/jwt.go b/server/jwt.goindex 89dce9c138..579683e472 100644--- a/server/jwt.go+++ b/server/jwt.go@@ -124,7 +124,7 @@ func setTokenCookie(c echo.Context, name, token string, expiration time.Time) {cookie.Path = "/"// Http-only helps mitigate the risk of client side script accessing the protected cookie.cookie.HttpOnly = true- // For now, we allow bytebase to run on non-https host, see https://github.com/bytebase/bytebase/issues/31+ // For now, we allow Bytebase to run on non-https host, see https://github.com/bytebase/bytebase/issues/31// cookie.Secure = truecookie.SameSite = http.SameSiteStrictModec.SetCookie(cookie)@@ -146,7 +146,7 @@ func setUserCookie(c echo.Context, user *api.Principal, expiration time.Time) {cookie.Value = strconv.Itoa(user.ID)cookie.Expires = expirationcookie.Path = "/"- // For now, we allow bytebase to run on non-https host, see https://github.com/bytebase/bytebase/issues/31+ // For now, we allow Bytebase to run on non-https host, see https://github.com/bytebase/bytebase/issues/31// cookie.Secure = truecookie.SameSite = http.SameSiteStrictModec.SetCookie(cookie)diff --git a/server/metric_reporter.go b/server/metric_reporter.goindex 7fc366ba14..cb72d3a077 100644--- a/server/metric_reporter.go+++ b/server/metric_reporter.go@@ -19,7 +19,7 @@ const (metricSchedulerInterval = time.Duration(1) * time.Hour// identifyTraitForPlan is the trait key for subscription plan.identifyTraitForPlan = "plan"- // identifyTraitForVersion is the trait key for bytebase version.+ // identifyTraitForVersion is the trait key for Bytebase version.identifyTraitForVersion = "version")diff --git a/server/sql.go b/server/sql.goindex 854b7ae1e9..27b45d12c7 100644--- a/server/sql.go+++ b/server/sql.go@@ -545,7 +545,7 @@ func (s *Server) syncEngineVersionAndSchema(ctx context.Context, instance *api.I}}if matchedDb != nil {- // Case 1, appear in both the bytebase metadata and the synced db schema+ // Case 1, appear in both the Bytebase metadata and the synced db schemasyncStatus := api.OKts := time.Now().Unix()databasePatch := &api.DatabasePatch{@@ -647,7 +647,7 @@ func (s *Server) syncEngineVersionAndSchema(ctx context.Context, instance *api.I}}- // Case 3, only appear in the bytebase metadata+ // Case 3, only appear in the Bytebase metadatafor _, db := range dbList {found := falsefor _, schema := range schemaList {diff --git a/server/task_check_executor_statement_advisor_composite.go b/server/task_check_executor_statement_advisor_composite.goindex 30336b9702..7f045a2505 100644--- a/server/task_check_executor_statement_advisor_composite.go+++ b/server/task_check_executor_statement_advisor_composite.go@@ -12,7 +12,7 @@ import ()// Schema review policy consists of a list of schema review rules.-// There is such a logical mapping in bytebase backend:+// There is such a logical mapping in Bytebase backend:// 1. One schema review policy maps a TaskCheckRun.// 2. Each schema review rule type maps an advisor.Type.// 3. Each [db.Type][AdvisorType] maps an advisor.diff --git a/store/pg_engine.go b/store/pg_engine.goindex bb386602b8..2481176e63 100644--- a/store/pg_engine.go+++ b/store/pg_engine.go@@ -181,7 +181,7 @@ func (db *DB) Open(ctx context.Context) (err error) {if err := db.setupDemoData(); err != nil {return fmt.Errorf("failed to setup demo data: %w."+" It could be Bytebase is running against an old Bytebase schema. If you are developing Bytebase, you can remove pgdata"+- " directory under the same directory where the bytebase binary resides. and restart again to let"++ " directory under the same directory where the Bytebase binary resides. and restart again to let"+" Bytebase create the latest schema. If you are running in production and don't want to reset the data, you can contact [email protected] for help",err)}@@ -675,7 +675,7 @@ type Tx struct {now time.Time}-// FormatError returns err as a bytebase error, if possible.+// FormatError returns err as a Bytebase error, if possible.// Otherwise returns the original error.func FormatError(err error) error {if err == nil {diff --git a/tests/tests.go b/tests/tests.goindex bf4707c988..9f42075b87 100644--- a/tests/tests.go+++ b/tests/tests.go@@ -113,7 +113,7 @@ type controller struct {func getTestPort(testName string) int {// We allocates 4 ports for each of the integration test, who probably would start- // the bytebase server, Postgres, MySQL and GitLab.+ // the Bytebase server, Postgres, MySQL and GitLab.tests := []string{"TestServiceRestart","TestSchemaAndDataUpdate",@@ -1449,7 +1449,7 @@ func setDefaultSchemaReviewRulePayload(ruleTp advisor.SchemaReviewRuleType) (str},})default:- return "", fmt.Errorf("Unknow schema review type for default payload: %s", ruleTp)+ return "", fmt.Errorf("unknown schema review type for default payload: %s", ruleTp)}if err != nil {