Skip to content

[close #407] br: Fix arm64 build#426

Merged
pingyu merged 1 commit intotikv:mainfrom
pingyu:br-build-arm
Apr 18, 2025
Merged

[close #407] br: Fix arm64 build#426
pingyu merged 1 commit intotikv:mainfrom
pingyu:br-build-arm

Conversation

@pingyu
Copy link
Copy Markdown
Collaborator

@pingyu pingyu commented Apr 17, 2025

What problem does this PR solve?

Issue Number: close #407

Problem Description: ci: Release arm64 artifact failed type/bug

What is changed and how does it work?

  • Set CGO_ENABLED=0 to cross platform building. The perform gap is not significant for tikv-br.
  • Fix the release version.

Code changes

  • No code

Check List for Tests

This PR has been tested by at least one of the following methods:

  • Manual test (add detailed scripts or steps below)
➜  make release
CGO_ENABLED=0 GOOS= GOARCH= GO111MODULE=on go build -tags codes -ldflags '-X "github.com/tikv/migration/br/pkg/version/build.ReleaseVersion=br-v1.1-master-dirty" -X "github.com/tikv/migration/br/pkg/version/build.BuildTS=2025-04-17 15:37:33" -X "github.com/tikv/migration/br/pkg/version/build.GitHash=49dcd7201fb0fb1d9d71c56ff37aae34d3923c63" -X "github.com/tikv/migration/br/pkg/version/build.GitBranch=main"' -o bin/tikv-br cmd/br/*.go
➜  bin/tikv-br -V
Release Version: br-v1.1-master-dirty
Git Commit Hash: 49dcd7201fb0fb1d9d71c56ff37aae34d3923c63
Git Branch: main
Go Version: go1.18.10
UTC Build Time: 2025-04-17 15:37:33
Race Enabled: false
➜  TARGET_OS=linux TARGET_ARCH=arm64 make release
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GO111MODULE=on go build -tags codes -ldflags '-X "github.com/tikv/migration/br/pkg/version/build.ReleaseVersion=br-v1.1-master-dirty" -X "github.com/tikv/migration/br/pkg/version/build.BuildTS=2025-04-17 15:37:55" -X "github.com/tikv/migration/br/pkg/version/build.GitHash=49dcd7201fb0fb1d9d71c56ff37aae34d3923c63" -X "github.com/tikv/migration/br/pkg/version/build.GitBranch=main"' -o bin/tikv-br cmd/br/*.go
➜  file bin/tikv-br
bin/tikv-br: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=i5bm3ASaKgv9QjxoPbHw/rCBgTS6HzUe_5sM2orsq/gZr6o5Bu4oehrihdMn-R/kG1x2g6nP5yibHak4MiM, not stripped
➜  TARGET_OS=linux TARGET_ARCH=amd64 make release
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -tags codes -ldflags '-X "github.com/tikv/migration/br/pkg/version/build.ReleaseVersion=br-v1.1-master-dirty" -X "github.com/tikv/migration/br/pkg/version/build.BuildTS=2025-04-17 15:38:21" -X "github.com/tikv/migration/br/pkg/version/build.GitHash=49dcd7201fb0fb1d9d71c56ff37aae34d3923c63" -X "github.com/tikv/migration/br/pkg/version/build.GitBranch=main"' -o bin/tikv-br cmd/br/*.go
➜  br git:(main) ✗ file bin/tikv-br                              
bin/tikv-br: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=6MVXmv9rgiVFhDIj9_A9/yrw1k9DY8TMydTLoiW6J/-Ui6TNwvVRAujHC5lwkj/k-jHrMFqilFRuUe3lME9, not stripped
➜  make release
go generate
CGO_ENABLED=0 GOOS= GOARCH= GO111MODULE=on go build -buildvcs=false -trimpath  -ldflags '-X "github.com/tikv/migration/cdc/pkg/version.ReleaseVersion=cdc-v1.3-master-dirty" -X "github.com/tikv/migration/cdc/pkg/version.BuildTS=2025-04-17 15:37:00" -X "github.com/tikv/migration/cdc/pkg/version.GitHash=49dcd7201fb0fb1d9d71c56ff37aae34d3923c63" -X "github.com/tikv/migration/cdc/pkg/version.GitBranch=main" -X "github.com/tikv/migration/cdc/pkg/version.GoVersion=go version go1.21.13 linux/amd64"' -o bin/tikv-cdc ./cmd/cdc/main.go
➜  bin/tikv-cdc version
Release Version: cdc-v1.3-master-dirty
Git Commit Hash: 49dcd7201fb0fb1d9d71c56ff37aae34d3923c63
Git Branch: main
UTC Build Time: 2025-04-17 15:37:00
Go Version: go version go1.21.13 linux/amd64
Failpoint Build: false

Side effects

  • No side effects

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation
  • Need to be included in the release note
  • No related changes

To reviewers

Please follow these principles to check this pull requests:

  • Concentration. One pull request should only do one thing. No matter how small it is, the change does exactly one thing and gets it right. Don't mix other changes into it.
  • Tests. A pull request should be test covered, whether the tests are unit tests, integration tests, or end-to-end tests. Tests should be sufficient, correct and don't slow down the CI pipeline largely.
  • Functionality. The pull request should implement what the author intends to do and fit well in the existing code base, resolve a real problem for TiDB/TiKV users. To get the author's intention and the pull request design, you could follow the discussions in the corresponding GitHub issue or internal.tidb.io topic.
  • Style. Code in the pull request should follow common programming style. (For Go, we have style checkers in CI). However, sometimes the existing code is inconsistent with the style guide, you should maintain consistency with the existing code or file a new issue to fix the existing code style first.
  • Documentation. If a pull request changes how users build, test, interact with, or release code, you must check whether it also updates the related documentation such as READMEs and any generated reference docs. Similarly, if a pull request deletes or deprecates code, you must check whether or not the corresponding documentation should also be deleted.
  • Performance. If you find the pull request may affect performance, you could ask the author to provide a benchmark result.

(The above text mainly refers to TiDB Development Guide. It's also highly recommended to read about Writing code review comments)

Signed-off-by: Ping Yu <yuping@pingcap.com>
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot bot commented Apr 17, 2025

@pingyu: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-integration-kafka-test d6003dc link true /test pull-integration-kafka-test

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link
Copy Markdown
Contributor

@zeminzhou zeminzhou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pingyu pingyu merged commit e056406 into tikv:main Apr 18, 2025
73 of 146 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: Release arm64 artifact failed

2 participants