Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: improve isFilePath detection and update documentation URLs (#17165)

Danny Xu0411a9277ddd
diff --git a/README.md b/README.md
index 1a6f06df36..931a02bbb5 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@
</p>
<p align="center">
- <a href="https://docs.bytebase.com/get-started/deploy-with-docker" target="_blank">⚙️ Install</a> •
+ <a href="https://docs.bytebase.com/get-started/self-host-vs-cloud" target="_blank">⚙️ Install</a> •
<a href="https://docs.bytebase.com">📚 Docs</a> •
<a href="https://demo.bytebase.com">🎮 Demo</a> •
<a href="https://discord.gg/huyw7gRsyA">💬 Discord</a> •
@@ -85,7 +85,7 @@ Visit [http://localhost:8080](http://localhost:8080) and follow the setup wizard
## Documentation
-- [Installation Guide](https://docs.bytebase.com/get-started/deploy-with-docker)
+- [Installation Guide](https://docs.bytebase.com/get-started/self-host-vs-cloud)
- [Tutorials](https://docs.bytebase.com/tutorials)
- [API Reference](https://docs.bytebase.com/api/overview)
- [FAQ](https://docs.bytebase.com/faq)
diff --git a/backend/api/v1/common.go b/backend/api/v1/common.go
index d1c5b5673a..d4ceb578bc 100644
--- a/backend/api/v1/common.go
+++ b/backend/api/v1/common.go
@@ -20,7 +20,7 @@ import (
type OperatorType string
const (
- setupExternalURLError = "external URL isn't setup yet, see https://docs.bytebase.com/get-started/install/external-url"
+ setupExternalURLError = "external URL isn't setup yet, see https://docs.bytebase.com/get-started/self-host/external-url"
ComparatorTypeEqual OperatorType = "="
ComparatorTypeLess OperatorType = "<"
diff --git a/backend/common/util.go b/backend/common/util.go
index 80ce899518..362eda86ea 100644
--- a/backend/common/util.go
+++ b/backend/common/util.go
@@ -34,7 +34,7 @@ const (
MinimumCompletedPlanCheckRun = 5
// ExternalURLPlaceholder is the docs link to configure --external-url.
- ExternalURLPlaceholder = "https://docs.bytebase.com/get-started/install/external-url"
+ ExternalURLPlaceholder = "https://docs.bytebase.com/get-started/self-host/external-url"
)
var letters = []rune("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
diff --git a/backend/store/db_connection.go b/backend/store/db_connection.go
index 486ae3a501..4d3ebee162 100644
--- a/backend/store/db_connection.go
+++ b/backend/store/db_connection.go
@@ -171,7 +171,15 @@ func (m *DBConnectionManager) reloadConnection(ctx context.Context, filePath str
// Helper functions
func isFilePath(s string) bool {
- return !strings.HasPrefix(s, "postgresql://") && !strings.HasPrefix(s, "postgres://")
+ if strings.HasPrefix(s, "postgresql://") || strings.HasPrefix(s, "postgres://") {
+ return false
+ }
+
+ if strings.Contains(s, "host=/tmp") {
+ return false
+ }
+
+ return true
}
func readURLFromFile(path string) (string, error) {
diff --git a/frontend/public/help/en/help.member.md b/frontend/public/help/en/help.member.md
index 31508f30a9..81146ba22f 100644
--- a/frontend/public/help/en/help.member.md
+++ b/frontend/public/help/en/help.member.md
@@ -7,4 +7,4 @@ title: What is 'Workspace Member' ?
#### Learn more
- [Manage Workspace Members](https://bytebase.cc/docs/get-started/step-by-step/register-accounts/#manage-members-eg-update-password)
-- [Roles and Permissions (RBAC)](https://docs.bytebase.com/concepts/roles-and-permissions)
+- [Roles and Permissions (RBAC)](https://docs.bytebase.com/administration/roles)
diff --git a/frontend/public/help/ja/help.member.md b/frontend/public/help/ja/help.member.md
index 07d2f42f2b..1e52b05494 100644
--- a/frontend/public/help/ja/help.member.md
+++ b/frontend/public/help/ja/help.member.md
@@ -7,4 +7,4 @@ title: ワークスペース・メンバー」とは?
#### Learn more
- [ワークスペース・メンバーの管理](https://bytebase.cc/docs/get-started/step-by-step/register-accounts/#manage-members-eg-update-password)
-- [役割と権限(RBAC)](https://docs.bytebase.com/concepts/roles-and-permissions)
+- [役割と権限(RBAC)](https://docs.bytebase.com/administration/roles)
diff --git a/frontend/public/help/zh/help.member.md b/frontend/public/help/zh/help.member.md
index 6295fc5134..4c255efca3 100644
--- a/frontend/public/help/zh/help.member.md
+++ b/frontend/public/help/zh/help.member.md
@@ -7,4 +7,4 @@ title: 什么是「空间成员」 ?
#### Learn more
- [管理成员](https://bytebase.cc/docs/get-started/step-by-step/register-accounts/#manage-members-eg-update-password)
-- [角色和权限 RBAC](https://docs.bytebase.com/concepts/roles-and-permissions)
+- [角色和权限 RBAC](https://docs.bytebase.com/administration/roles)
diff --git a/frontend/src/components/GeneralSetting/NetworkSetting.vue b/frontend/src/components/GeneralSetting/NetworkSetting.vue
index b6faa011c5..9c7cfdca6f 100644
--- a/frontend/src/components/GeneralSetting/NetworkSetting.vue
+++ b/frontend/src/components/GeneralSetting/NetworkSetting.vue
@@ -18,7 +18,7 @@
<div class="mb-3 text-sm text-gray-400">
{{ $t("settings.general.workspace.external-url.description") }}
<LearnMoreLink
- url="https://docs.bytebase.com/get-started/install/external-url?source=console"
+ url="https://docs.bytebase.com/get-started/self-host/external-url?source=console"
/>
</div>
<NTooltip placement="top-start" :disabled="allowEdit">
diff --git a/frontend/src/components/ProjectMember/ProjectMemberPanel.vue b/frontend/src/components/ProjectMember/ProjectMemberPanel.vue
index ac54dbd28c..2be5ed5cb3 100644
--- a/frontend/src/components/ProjectMember/ProjectMemberPanel.vue
+++ b/frontend/src/components/ProjectMember/ProjectMemberPanel.vue
@@ -3,7 +3,7 @@
<div class="textinfolabel">
{{ $t("project.members.description") }}
<a
- href="https://docs.bytebase.com/concepts/roles-and-permissions/?source=console#project-roles"
+ href="https://docs.bytebase.com/administration/roles/?source=console#project-roles"
target="_blank"
class="normal-link inline-flex flex-row items-center"
>
diff --git a/frontend/src/components/ReleaseRemindModal.vue b/frontend/src/components/ReleaseRemindModal.vue
index 31e983d9ba..2dda67d0cf 100644
--- a/frontend/src/components/ReleaseRemindModal.vue
+++ b/frontend/src/components/ReleaseRemindModal.vue
@@ -41,7 +41,7 @@ const subscriptionStore = useSubscriptionV1Store();
const link = computed(() => {
if (subscriptionStore.isSelfHostLicense) {
- return "https://docs.bytebase.com/get-started/deploy-with-docker";
+ return "https://docs.bytebase.com/get-started/self-host-vs-cloud";
}
return subscriptionStore.purchaseLicenseUrl;
});
diff --git a/frontend/src/components/Role/Setting/RoleSetting.vue b/frontend/src/components/Role/Setting/RoleSetting.vue
index 061e938e2d..c539ffa65f 100644
--- a/frontend/src/components/Role/Setting/RoleSetting.vue
+++ b/frontend/src/components/Role/Setting/RoleSetting.vue
@@ -3,7 +3,7 @@
<div class="textinfolabel">
{{ $t("role.setting.description") }}
<a
- href="https://docs.bytebase.com/administration/custom-roles?source=console"
+ href="https://docs.bytebase.com/administration/roles?source=console"
class="normal-link text-sm inline-flex flex-row items-center"
target="_blank"
>
diff --git a/frontend/src/store/modules/v1/actuator.ts b/frontend/src/store/modules/v1/actuator.ts
index d5a44773af..73357e3b45 100644
--- a/frontend/src/store/modules/v1/actuator.ts
+++ b/frontend/src/store/modules/v1/actuator.ts
@@ -23,7 +23,7 @@ import { UserType } from "@/types/proto-es/v1/user_service_pb";
import { semverCompare } from "@/utils";
const EXTERNAL_URL_PLACEHOLDER =
- "https://docs.bytebase.com/get-started/install/external-url";
+ "https://docs.bytebase.com/get-started/self-host/external-url";
const GITHUB_API_LIST_BYTEBASE_RELEASE =
"https://api.github.com/repos/bytebase/bytebase/releases";
diff --git a/frontend/src/views/BannerDemo.vue b/frontend/src/views/BannerDemo.vue
index 2280a2508f..50c6994a63 100644
--- a/frontend/src/views/BannerDemo.vue
+++ b/frontend/src/views/BannerDemo.vue
@@ -18,7 +18,7 @@
class="flex flex-row space-x-4 order-3 my-2 flex-shrink-0 w-full sm:order-2 sm:py-1 sm:my-0 sm:w-auto"
>
<a
- href="https://docs.bytebase.com/get-started/deploy-with-docker/?source=demo"
+ href="https://docs.bytebase.com/get-started/self-host-vs-cloud/?source=demo"
target="_blank"
class="flex items-center justify-center pl-4 pr-2 py-1 border border-transparent rounded-sm text-base font-medium text-accent bg-white hover:bg-indigo-50"
>
diff --git a/helm-charts/bytebase/README.md b/helm-charts/bytebase/README.md
index ef0b8b7007..564ca4f3fb 100644
--- a/helm-charts/bytebase/README.md
+++ b/helm-charts/bytebase/README.md
@@ -77,7 +77,7 @@ upgrade bytebase-release bytebase-repo/bytebase
| `bytebase.registryMirrorHost` | The host for the Docker registry mirror. Leave empty for default registry usage. | "" |
| `bytebase.option.port` | Port where Bytebase server runs. | 8080 |
| `bytebase.option.data` | Data directory of Bytebase data stored. | /var/opt/bytebase |
-| `bytebase.option.external-url` | The address for users to visit Bytebase, visit [our docs](https://docs.bytebase.com/get-started/install/external-url/) to get more details. | "<https://docs.bytebase.com/get-started/install/external-url>" |
+| `bytebase.option.external-url` | The address for users to visit Bytebase, visit [our docs](https://docs.bytebase.com/get-started/self-host/external-url/) to get more details. | "<https://docs.bytebase.com/get-started/self-host/external-url>" |
| `bytebase.option.externalPg.url` | The PostgreSQL url(DSN) for Bytebase to store the metadata. | "" |
| `bytebase.option.externalPg.existingPgURLSecret` | The name of Secret stores the PostgreSQL url(DSN) for Bytebase to store the metadata. | "" |
| `bytebase.option.externalPg.existingPgURLSecretKey` | The key of Secret stores the PostgreSQL url(DSN) for Bytebase to store the metadata. Should be used with `bytebase.option.externalPg.existingPgURLSecret` together. | "" |
diff --git a/helm-charts/bytebase/values.yaml b/helm-charts/bytebase/values.yaml
index 4e62cf1cc8..5cc18f832e 100644
--- a/helm-charts/bytebase/values.yaml
+++ b/helm-charts/bytebase/values.yaml
@@ -8,7 +8,7 @@ bytebase:
option:
port: 8080
data: "/var/opt/bytebase"
- external-url: "https://docs.bytebase.com/get-started/install/external-url"
+ external-url: "https://docs.bytebase.com/get-started/self-host/external-url"
externalPg:
url: ""
# If users need to read the pgURL from a secret, they can specify the secret name and key here.