From 738c4fd20363a329541d5b7f85d52e102c57e989 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 17 Dec 2020 19:37:46 -0800 Subject: [PATCH 1/9] fix logging when error address https://github.com/chrislusf/seaweedfs/pull/1685#issuecomment-747845601 --- weed/storage/store.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/weed/storage/store.go b/weed/storage/store.go index 83c40a01a..ff28be47c 100644 --- a/weed/storage/store.go +++ b/weed/storage/store.go @@ -257,12 +257,12 @@ func (s *Store) CollectHeartbeat() *master_pb.Heartbeat { location.volumesLock.Lock() for _, vid := range deleteVids { found, err := location.deleteVolumeById(vid) - if found { - if err == nil { + if err == nil { + if found { glog.V(0).Infof("volume %d is deleted", vid) - } else { - glog.V(0).Infof("delete volume %d: %v", vid, err) } + } else { + glog.V(0).Infof("delete volume %d: %v", vid, err) } } location.volumesLock.Unlock() From 8e3b798ea018b5944e02b9b8ecf55c9f1ac6498f Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 17 Dec 2020 21:57:41 -0800 Subject: [PATCH 2/9] Update release.yml --- .github/workflows/release.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 521418e2a..3daaf3216 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,8 +14,20 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 + - name: Delete old release assets + uses: mknejp/delete-release-assets@v1 + with: + token: ${{ github.token }} + tag: dev + assets: | + weed-large-disk-* + weed-* + + - name: Set BUILD_TIME env + run: echo BUILD_TIME=$(date -u +%Y%m%d) >> ${GITHUB_ENV} + - name: Go Release Binaries - uses: wangyoucao577/go-release-action@v1.10 + uses: wangyoucao577/go-release-action@feature/asset-name with: github_token: ${{ secrets.GITHUB_TOKEN }} goos: linux # default is @@ -27,6 +39,8 @@ jobs: # Where to run `go build .` project_path: weed binary_name: weed-large-disk + asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}" + - name: Go Release Binaries uses: wangyoucao577/go-release-action@v1.10 with: From 160d46dbcc57749d4651dc39da6a92fb8acab053 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 17 Dec 2020 22:08:04 -0800 Subject: [PATCH 3/9] Update release.yml --- .github/workflows/release.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3daaf3216..0d48b3299 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,10 @@ jobs: build: name: Build runs-on: ubuntu-latest + strategy: + matrix: + goos: [linux, windows, darwin] + goarch: ["386", amd64] steps: - name: Check out code into the Go module directory @@ -24,14 +28,14 @@ jobs: weed-* - name: Set BUILD_TIME env - run: echo BUILD_TIME=$(date -u +%Y%m%d) >> ${GITHUB_ENV} + run: echo BUILD_TIME=$(date -u +%Y-%m-%d-%H-%M) >> ${GITHUB_ENV} - name: Go Release Binaries uses: wangyoucao577/go-release-action@feature/asset-name with: github_token: ${{ secrets.GITHUB_TOKEN }} - goos: linux # default is - goarch: amd64 # default is + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} release_tag: dev overwrite: true build_flags: -tags 5BytesOffset # optional, default is @@ -45,11 +49,13 @@ jobs: uses: wangyoucao577/go-release-action@v1.10 with: github_token: ${{ secrets.GITHUB_TOKEN }} - goos: linux # default is - goarch: amd64 # default is + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} release_tag: dev overwrite: true + build_flags: -tags 5BytesOffset # optional, default is ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}} # Where to run `go build .` project_path: weed - binary_name: weed + binary_name: weed- + asset_name: "weed-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}" From 1b4237795ab8079222e34c4ee714175cb0691fbf Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 17 Dec 2020 22:11:14 -0800 Subject: [PATCH 4/9] Update release.yml --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0d48b3299..96894a9e1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,7 @@ jobs: with: token: ${{ github.token }} tag: dev + fail-if-no-assets: false assets: | weed-large-disk-* weed-* From 7af9415696aec42dd3f64a4469e71650861cfdaa Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 17 Dec 2020 22:16:14 -0800 Subject: [PATCH 5/9] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 96894a9e1..2fb3d3355 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: goos: [linux, windows, darwin] - goarch: ["386", amd64] + goarch: ["386", amd64, arm] steps: - name: Check out code into the Go module directory From 9fc07feb007a3bd608b5a16fa49c17a80672df56 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 17 Dec 2020 22:17:41 -0800 Subject: [PATCH 6/9] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2fb3d3355..28023af6e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,7 +47,7 @@ jobs: asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}" - name: Go Release Binaries - uses: wangyoucao577/go-release-action@v1.10 + uses: wangyoucao577/go-release-action@feature/asset-name with: github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} From 47f5ec0cde6dac18eb60b527276269f3f8f210f8 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 17 Dec 2020 22:19:26 -0800 Subject: [PATCH 7/9] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 28023af6e..401dbe873 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - goos: [linux, windows, darwin] + goos: [linux, windows, darwin, freebsd, netbsd, openbsd ] goarch: ["386", amd64, arm] steps: From 8c00c46f9b3b7b3ae570d1a2ba5b6d25dc7108fa Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 17 Dec 2020 22:28:02 -0800 Subject: [PATCH 8/9] Update release.yml --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 401dbe873..a3fb81441 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,7 +54,6 @@ jobs: goarch: ${{ matrix.goarch }} release_tag: dev overwrite: true - build_flags: -tags 5BytesOffset # optional, default is ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}} # Where to run `go build .` project_path: weed From dbf46b3aa1be49bfa61aca014bb1b9380c1ef51b Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 17 Dec 2020 22:28:43 -0800 Subject: [PATCH 9/9] Update release.yml --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a3fb81441..70c14487c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,8 @@ jobs: strategy: matrix: goos: [linux, windows, darwin, freebsd, netbsd, openbsd ] - goarch: ["386", amd64, arm] + goarch: ["386", amd64] + # goarch: ["386", amd64, arm] steps: - name: Check out code into the Go module directory