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

fix: fix update-dashboard script not work when target is semver style (#7638) #7643

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #7638

What problem does this PR solve?

Issue Number: Close #7637

What is changed and how does it work?

This PR fix the scripts/update-dashboard script can't work with dashboard semver style version format.

none

Test

❯ scripts/update-dashboard.sh v7.6.0-f7bbcdcf-test
+ Update dashboard version to v7.6.0-f7bbcdcf-test
go: upgraded github.com/pingcap/tidb-dashboard v0.0.0-20231218095437-aa621ed4de2c => v0.0.0-20231228101154-f7bbcdcf902c
./scripts/embed-dashboard-ui.sh
+ Clean up existing asset file
+ Fetch TiDB Dashboard Go module
  - TiDB Dashboard directory: /home/bao/go/pkg/mod/github.com/pingcap/[email protected]
+ Create download cache directory: /mnt/bao/codes/work/pd/.dashboard_download_cache
+ Discover TiDB Dashboard release version
  - TiDB Dashboard release version: 7.6.0-f7bbcdcf-test
+ Check whether pre-built assets are available
  - Cached archive does not exist
  - Download pre-built embedded assets from GitHub release
  - Download https://github.com/pingcap/tidb-dashboard/releases/download/v7.6.0-f7bbcdcf-test/embedded-assets-golang.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 12.1M  100 12.1M    0     0  2419k      0  0:00:05  0:00:05 --:--:-- 2878k
  - Save archive to cache: /mnt/bao/codes/work/pd/.dashboard_download_cache/embedded-assets-golang-7.6.0-f7bbcdcf-test.zip
+ Unpack embedded asset from archive
Archive:  /mnt/bao/codes/work/pd/.dashboard_download_cache/embedded-assets-golang-7.6.0-f7bbcdcf-test.zip
  inflating: embedded_assets_handler.go  
  - Unpacked /mnt/bao/codes/work/pd/pkg/dashboard/uiserver/embedded_assets_handler.go
GOEXPERIMENT= CGO_ENABLED=1 go build  -gcflags '' -ldflags '-X "github.com/tikv/pd/pkg/versioninfo.PDReleaseVersion=v7.6.0-alpha-157-gc7644be0e-dirty" -X "github.com/tikv/pd/pkg/versioninfo.PDBuildTS=2023-12-29 03:20:07" -X "github.com/tikv/pd/pkg/versioninfo.PDGitHash=c7644be0e86d28719b428f22ceec778ee143696a" -X "github.com/tikv/pd/pkg/versioninfo.PDGitBranch=master" -X "github.com/tikv/pd/pkg/versioninfo.PDEdition=Community" -X "github.com/pingcap/tidb-dashboard/pkg/utils/version.InternalVersion=7.6.0-f7bbcdcf-test" -X "github.com/pingcap/tidb-dashboard/pkg/utils/version.Standalone=No" -X "github.com/pingcap/tidb-dashboard/pkg/utils/version.PDVersion=v7.6.0-alpha-157-gc7644be0e-dirty" -X "github.com/pingcap/tidb-dashboard/pkg/utils/version.BuildTime=2023-12-29 03:20:07" -X "github.com/pingcap/tidb-dashboard/pkg/utils/version.BuildGitHash=f7bbcdcf902c"' -tags "" -o /mnt/bao/codes/work/pd/bin/pd-server cmd/pd-server/main.go
❯ scripts/update-dashboard.sh v2023.12.18.1                   
+ Update dashboard version to v2023.12.18.1
go: downgraded github.com/pingcap/tidb-dashboard v0.0.0-20231228101154-f7bbcdcf902c => v0.0.0-20231218095437-aa621ed4de2c
./scripts/embed-dashboard-ui.sh
+ Clean up existing asset file
+ Fetch TiDB Dashboard Go module
  - TiDB Dashboard directory: /home/bao/go/pkg/mod/github.com/pingcap/[email protected]
+ Create download cache directory: /mnt/bao/codes/work/pd/.dashboard_download_cache
+ Discover TiDB Dashboard release version
  - TiDB Dashboard release version: 2023.12.18.1
+ Check whether pre-built assets are available
  - Cached archive exists: /mnt/bao/codes/work/pd/.dashboard_download_cache/embedded-assets-golang-2023.12.18.1.zip
+ Unpack embedded asset from archive
Archive:  /mnt/bao/codes/work/pd/.dashboard_download_cache/embedded-assets-golang-2023.12.18.1.zip
  inflating: embedded_assets_handler.go  
  - Unpacked /mnt/bao/codes/work/pd/pkg/dashboard/uiserver/embedded_assets_handler.go
GOEXPERIMENT= CGO_ENABLED=1 go build  -gcflags '' -ldflags '-X "github.com/tikv/pd/pkg/versioninfo.PDReleaseVersion=v7.6.0-alpha-157-gc7644be0e-dirty" -X "github.com/tikv/pd/pkg/versioninfo.PDBuildTS=2023-12-29 03:21:38" -X "github.com/tikv/pd/pkg/versioninfo.PDGitHash=c7644be0e86d28719b428f22ceec778ee143696a" -X "github.com/tikv/pd/pkg/versioninfo.PDGitBranch=master" -X "github.com/tikv/pd/pkg/versioninfo.PDEdition=Community" -X "github.com/pingcap/tidb-dashboard/pkg/utils/version.InternalVersion=2023.12.18.1" -X "github.com/pingcap/tidb-dashboard/pkg/utils/version.Standalone=No" -X "github.com/pingcap/tidb-dashboard/pkg/utils/version.PDVersion=v7.6.0-alpha-157-gc7644be0e-dirty" -X "github.com/pingcap/tidb-dashboard/pkg/utils/version.BuildTime=2023-12-29 03:21:38" -X "github.com/pingcap/tidb-dashboard/pkg/utils/version.BuildGitHash=aa621ed4de2c"' -tags "" -o /mnt/bao/codes/work/pd/bin/pd-server cmd/pd-server/main.go

Release note

None.

@ti-chi-bot ti-chi-bot added ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/cherry-pick-for-release-7.5 This PR is cherry-picked to release-7.5 from a source PR. labels Dec 29, 2023
Copy link
Contributor

ti-chi-bot bot commented Dec 29, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • disksing

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

Copy link
Contributor

ti-chi-bot bot commented Dec 29, 2023

This cherry pick PR is for a release branch and has not yet been approved by triage owners.
Adding the do-not-merge/cherry-pick-not-approved label.

To merge this cherry pick:

  1. It must be approved by the approvers firstly.
  2. AFTER it has been approved by approvers, please wait for the cherry-pick merging approval from triage owners.

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/test-infra repository.

@ti-chi-bot ti-chi-bot bot requested review from disksing and Yisaer December 29, 2023 09:55
Copy link

codecov bot commented Dec 29, 2023

Codecov Report

Merging #7643 (bcb5c7d) into release-7.5 (c9c9979) will decrease coverage by 0.08%.
Report is 20 commits behind head on release-7.5.
The diff coverage is n/a.

Additional details and impacted files
@@               Coverage Diff               @@
##           release-7.5    #7643      +/-   ##
===============================================
- Coverage        74.74%   74.66%   -0.08%     
===============================================
  Files              443      443              
  Lines            47891    47903      +12     
===============================================
- Hits             35795    35766      -29     
- Misses            8950     8981      +31     
- Partials          3146     3156      +10     
Flag Coverage Δ
unittests 74.66% <ø> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@baurine
Copy link
Contributor

baurine commented Dec 30, 2023

Please help close this PR, I will re-submit it later manually when it's needed. this change has been included in the merged PR #7825

@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 24, 2024
@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 29, 2024
Copy link
Contributor

ti-chi-bot bot commented Mar 29, 2024

PR needs rebase.

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/test-infra repository.

@HuSharp
Copy link
Member

HuSharp commented Mar 29, 2024

Please help close this PR, I will re-submit it later manually when it's needed. this change has been included in the merged PR #7825

@HuSharp HuSharp closed this Mar 29, 2024
@HuSharp HuSharp deleted the cherry-pick-7638-to-release-7.5 branch March 29, 2024 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/cherry-pick-not-approved needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. status/LGT1 Indicates that a PR has LGTM 1. type/cherry-pick-for-release-7.5 This PR is cherry-picked to release-7.5 from a source PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants