Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make enterprise-server does not set TiDBEnterpriseExtensionGitHash #47646

Closed
lcwangchao opened this issue Oct 16, 2023 · 1 comment · Fixed by #47647 or #47658
Closed

make enterprise-server does not set TiDBEnterpriseExtensionGitHash #47646

lcwangchao opened this issue Oct 16, 2023 · 1 comment · Fixed by #47647 or #47658
Labels
affects-7.1 severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@lcwangchao
Copy link
Collaborator

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

make enterprise-server

output is:

# git submodule init && git submodule update --force
cd pkg/extension/enterprise/generate && GO111MODULE=on go generate -run genfile main.go
CGO_ENABLED=1 GO111MODULE=on go build  -tags codes -tags enterprise  -ldflags '-X "github.com/pingcap/tidb/pkg/parser/mysql.TiDBReleaseVersion=v7.5.0-alpha-116-g135d614f47" -X "github.com/pingcap/tidb/pkg/util/versioninfo.TiDBBuildTS=2023-10-16 04:52:11" -X "github.com/pingcap/tidb/pkg/util/versioninfo.TiDBGitHash=135d614f4714bec2773237692c8fd40dd9af047b" -X "github.com/pingcap/tidb/pkg/util/versioninfo.TiDBGitBranch=master" -X "github.com/pingcap/tidb/pkg/util/versioninfo.TiDBEdition=Enterprise"  ' -o bin/tidb-server cmd/tidb-server/main.go

TiDBEnterpriseExtensionGitHash should be set but not.

./bin/tidb-server -V

output:

Release Version: v7.5.0-alpha-116-g135d614f47
Edition: Enterprise
Git Commit Hash: 135d614f4714bec2773237692c8fd40dd9af047b
Git Branch: master
UTC Build Time: 2023-10-16 04:52:11
GoVersion: go1.21.0
Race Enabled: false
Check Table Before Drop: false
Store: unistore

2. What did you expect to see? (Required)

TiDBEnterpriseExtensionGitHash should be set and we should have a enterprise commit hash for ./bin/tidb-server -V

3. What did you see instead (Required)

TiDBEnterpriseExtensionGitHash not set

4. What is your TiDB version? (Required)

master

@lcwangchao lcwangchao added type/bug The issue is confirmed as a bug. affects-7.1 affects-tidb/sql-infra labels Oct 16, 2023
@lcwangchao
Copy link
Collaborator Author

Two reasons:

  1. *: Fix portability issue in Makefile.common #43414 makes -a to -d to determine if extension/enterprise/.git exists. But ``extension/enterprise/.git` is a file, not a folder, so this will always be false.
  2. *: move most of the packages to 'pkg' #47123 lost to rename extension/enterprise to pkg/extension/enterprise in the same position

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.1 severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
1 participant