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

Merged
merged 1 commit into from
Dec 29, 2023

Conversation

baurine
Copy link
Contributor

@baurine baurine commented Dec 29, 2023

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/tidb-dashboard@v0.0.0-20231228101154-f7bbcdcf902c
+ 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/tidb-dashboard@v0.0.0-20231218095437-aa621ed4de2c
+ 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.

Copy link
Contributor

ti-chi-bot bot commented Dec 29, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • HuSharp
  • rleungx

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.

@ti-chi-bot ti-chi-bot bot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Dec 29, 2023
@ti-chi-bot ti-chi-bot bot added the needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. label Dec 29, 2023
Copy link
Contributor

ti-chi-bot bot commented Dec 29, 2023

Hi @baurine. Thanks for your PR.

I'm waiting for a tikv member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 29, 2023
@baurine baurine force-pushed the fix/fix-update-dashboard-script branch from b178426 to d925253 Compare December 29, 2023 03:37
@baurine baurine changed the title fix: fix update-dashboard script when target is semver style fix: fix update-dashboard script not work when target is semver style Dec 29, 2023
Copy link

codecov bot commented Dec 29, 2023

Codecov Report

Merging #7638 (980853a) into master (c7644be) will decrease coverage by 0.07%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7638      +/-   ##
==========================================
- Coverage   74.78%   74.72%   -0.07%     
==========================================
  Files         459      459              
  Lines       50975    50975              
==========================================
- Hits        38123    38089      -34     
- Misses       9478     9504      +26     
- Partials     3374     3382       +8     
Flag Coverage Δ
unittests 74.72% <ø> (-0.07%) ⬇️

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

@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label Dec 29, 2023
@baurine baurine force-pushed the fix/fix-update-dashboard-script branch from d925253 to f9a2e4a Compare December 29, 2023 03:58
@baurine baurine marked this pull request as draft December 29, 2023 04:01
@ti-chi-bot ti-chi-bot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 29, 2023
@baurine baurine force-pushed the fix/fix-update-dashboard-script branch from f9a2e4a to 19224fb Compare December 29, 2023 04:40
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 29, 2023
Signed-off-by: baurine <2008.hbl@gmail.com>
@baurine baurine force-pushed the fix/fix-update-dashboard-script branch from 19224fb to 980853a Compare December 29, 2023 04:43
@baurine baurine marked this pull request as ready for review December 29, 2023 04:50
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 29, 2023
@HuSharp
Copy link
Member

HuSharp commented Dec 29, 2023

/ok-to-test

@ti-chi-bot ti-chi-bot bot added ok-to-test Indicates a PR is ready to be tested. and removed needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. labels Dec 29, 2023
@ti-chi-bot ti-chi-bot bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Dec 29, 2023
@rleungx
Copy link
Member

rleungx commented Dec 29, 2023

/merge

Copy link
Contributor

ti-chi-bot bot commented Dec 29, 2023

@rleungx: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

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 ti-community-infra/tichi repository.

Copy link
Contributor

ti-chi-bot bot commented Dec 29, 2023

This pull request has been accepted and is ready to merge.

Commit hash: 980853a

@ti-chi-bot ti-chi-bot bot added status/can-merge Indicates a PR has been approved by a committer. release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Dec 29, 2023
@ti-chi-bot ti-chi-bot bot merged commit b4a73b3 into tikv:master Dec 29, 2023
25 of 26 checks passed
@baurine baurine deleted the fix/fix-update-dashboard-script branch December 29, 2023 05:41
@baurine
Copy link
Contributor Author

baurine commented Dec 29, 2023

/cherry-pick release-7.5

@baurine
Copy link
Contributor Author

baurine commented Dec 29, 2023

/cherry-pick release-7.1

@baurine
Copy link
Contributor Author

baurine commented Dec 29, 2023

/cherry-pick release-6.5

@ti-chi-bot
Copy link
Member

@baurine: new pull request created to branch release-7.5: #7643.

In response to this:

/cherry-pick release-7.5

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 ti-community-infra/tichi repository.

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Dec 29, 2023
close tikv#7637

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

@baurine: new pull request created to branch release-7.1: #7644.

In response to this:

/cherry-pick release-7.1

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 ti-community-infra/tichi repository.

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Dec 29, 2023
close tikv#7637

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

@baurine: new pull request created to branch release-6.5: #7645.

In response to this:

/cherry-pick release-6.5

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 ti-community-infra/tichi repository.

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Dec 29, 2023
close tikv#7637

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
pingandb pushed a commit to pingandb/pd that referenced this pull request Jan 18, 2024
…tikv#7638)

close tikv#7637

none

Signed-off-by: baurine <2008.hbl@gmail.com>
Signed-off-by: pingandb <songge102@pingan.com.cn>
baurine added a commit to baurine/pd that referenced this pull request Feb 19, 2024
baurine added a commit to baurine/pd that referenced this pull request Feb 28, 2024
baurine added a commit to baurine/pd that referenced this pull request Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] Fix scripts/update-dashboard scripts to support dashboard semver style version
5 participants