Skip to content

Commit

Permalink
Merge pull request #994 from bnb-chain/develop
Browse files Browse the repository at this point in the history
release: prepare release for 0.2.4-alpha.1
  • Loading branch information
jingjunLi authored Aug 9, 2023
2 parents 502e6b7 + feb8cb4 commit aa43641
Show file tree
Hide file tree
Showing 278 changed files with 63,904 additions and 3,275 deletions.
3 changes: 1 addition & 2 deletions .github/commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ const validateTypeNums = (parsedCommit) => {
return [true,'']
}


module.exports = {
parserPreset: {
parserOpts: {
headerPattern: /.*/,
headerPattern: /^(.*):.*/,
}
},
extends: ['@commitlint/config-conventional'],
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/commit-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Commit Lint

on:
push:
branches:
- master
- develop
- fix-release*

pull_request:
branches:

jobs:
commit-message-lint:
strategy:
matrix:
node-version: [14.x]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- uses: actions/cache@v3
with:
path: |
~/.npm
**/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Deps
run: |
npm install -g commitlint-plugin-function-rules @commitlint/cli
npm install --save-dev commitlint-plugin-function-rules @commitlint/cli
- uses: wagoid/commitlint-github-action@v5
id: commitlint
env:
NODE_PATH: ${{ github.workspace }}/node_modules
with:
configFile: /github/workspace/.github/commitlint.config.js

# branch-naming-lint:
# strategy:
# matrix:
# os: [ ubuntu-latest ]
# runs-on: ${{ matrix.os }}
# steps:
# - uses: deepakputhraya/action-branch-name@master
# with:
# regex: '([a-z])+\-([a-z])+'
# allowed_prefixes: 'build,chore,ci,docs,feat,fix,perf,refactor,revert,style,test'
# ignore: master,develop,release
# min_length: 5
# max_length: 30
1 change: 0 additions & 1 deletion .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
pull_request:
branches:


jobs:
e2e-test:
strategy:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/sp-exit-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
pull_request:
branches:


jobs:
e2e-test:
strategy:
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*.dll
*.so
*.dylib
*.pb.go
build/
.storage_provider_cli_history

Expand Down Expand Up @@ -32,4 +31,4 @@ logs/

# Local deployment
deployment/localup/local_env/
greenfield/
greenfield/
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# Changelog

## v0.2.4-alpha.1

FEATURES
* [#857](https://github.com/bnb-chain/greenfield-storage-provider/pull/857) feat: validate virtual group families' qualification
* [#985](https://github.com/bnb-chain/greenfield-storage-provider/pull/985) feat:time Ticker
* [#981](https://github.com/bnb-chain/greenfield-storage-provider/pull/981) feat: add tx confirm func and create virtual group retry
* [#968](https://github.com/bnb-chain/greenfield-storage-provider/pull/968) feat: bucket migrate check when load from db


REFACTOR
* [#983](https://github.com/bnb-chain/greenfield-storage-provider/pull/983) refine: refactor bucket migrate code
* [#953](https://github.com/bnb-chain/greenfield-storage-provider/pull/953) Refactor manager that dispatch task model
* [#976](https://github.com/bnb-chain/greenfield-storage-provider/pull/976) chore: refine migrate piece workflow
* [#960](https://github.com/bnb-chain/greenfield-storage-provider/pull/960) docs: polish sp docs to the lastest version

BUGFIX
* [#908](https://github.com/bnb-chain/greenfield-storage-provider/pull/908) fix: auth refactoring for security review
* [#987](https://github.com/bnb-chain/greenfield-storage-provider/pull/987) fix: ignore duplicate entry when create bucket traffic
* [#973](https://github.com/bnb-chain/greenfield-storage-provider/pull/973) fix: add missing path for pprof server
* [#966](https://github.com/bnb-chain/greenfield-storage-provider/pull/966) fix: refine migrate gvg task workflow
* [#965](https://github.com/bnb-chain/greenfield-storage-provider/pull/965) fix: repeated error xml msg
* [#963](https://github.com/bnb-chain/greenfield-storage-provider/pull/963) fix: only metadata and blocksyncer need to load bsdb
* [#955](https://github.com/bnb-chain/greenfield-storage-provider/pull/955) fix: check sp and bucket status when putting object
* [#935](https://github.com/bnb-chain/greenfield-storage-provider/pull/935) fix: empty bucket when bucket migrate
* [#927](https://github.com/bnb-chain/greenfield-storage-provider/pull/927) fix: filter complete migration buckets

TEST
* [#982](https://github.com/bnb-chain/greenfield-storage-provider/pull/982) test: piece store pkg storage dir adds unit test
* [#977](https://github.com/bnb-chain/greenfield-storage-provider/pull/977) test: piece store pkg adds unit test
* [#967](https://github.com/bnb-chain/greenfield-storage-provider/pull/967) test: package util adds unit test

## 0.2.3-alpha.11

FEATURES
Expand Down
72 changes: 41 additions & 31 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,47 +1,43 @@
SHELL := /bin/bash

.PHONY: all check format vet generate install-tools buf-gen proto-clean build test tidy clean
.PHONY: all build clean format install-tools generate lint test tidy vet buf-gen proto-clean

help:
@echo "Please use \`make <target>\` where <target> is one of"
@echo " vet to do static check"
@echo " build to create bin directory and build"
@echo " generate to generate code"
@echo " build to create build directory and compile sp"
@echo " clean to remove build directory"
@echo " format to format sp code"
@echo " generate to generate mock code"
@echo " install-tools to install mockgen, buf and protoc-gen-gocosmos tools"
@echo " lint to run golangci lint"
@echo " test to run all sp unit tests"
@echo " tidy to run go mod tidy and verify"
@echo " vet to do static check"
@echo " buf-gen to use buf to generate pb.go files"
@echo " proto-clean to remove generated pb.go files"
@echo " proto-format to format proto files"
@echo " proto-format-check to check proto files"

build:
bash +x ./build.sh

clean:
rm -rf ./build

format:
bash script/format.sh
gofmt -w -l .

proto-format:
buf format -w

proto-format-check:
buf format --diff --exit-code

vet:
go vet ./...

generate:
go generate ./...

install-tools:
go install go.uber.org/mock/mockgen@latest
go install github.com/bufbuild/buf/cmd/buf@v1.13.1
go install github.com/bufbuild/buf/cmd/buf@v1.25.0
go install github.com/cosmos/gogoproto/protoc-gen-gocosmos@latest

buf-gen:
rm -rf ./base/types/*/*.pb.go && rm -rf ./modular/metadata/types/*.pb.go && rm -rf ./store/types/*.pb.go
buf generate

proto-clean:
rm -rf ./base/types/*/*.pb.go && rm -rf ./modular/metadata/types/*.pb.go && rm -rf ./store/types/*.pb.go

build:
bash +x ./build.sh

tidy:
go mod tidy
go mod verify
lint:
golangci-lint run --fix

# only run unit test, exclude e2e tests
test:
Expand All @@ -50,8 +46,22 @@ test:
go test `go list ./... | grep -v /test/`
# go test -cover ./...

clean:
rm -rf ./build
tidy:
go mod tidy
go mod verify

lint:
golangci-lint run --fix
vet:
go vet ./...

buf-gen:
rm -rf ./base/types/*/*.pb.go && rm -rf ./modular/metadata/types/*.pb.go && rm -rf ./store/types/*.pb.go
buf generate

proto-clean:
rm -rf ./base/types/*/*.pb.go && rm -rf ./modular/metadata/types/*.pb.go && rm -rf ./store/types/*.pb.go

proto-format:
buf format -w

proto-format-check:
buf format --diff --exit-code
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Greenfield Storage Provider (abbreviated SP) is storage service infrastructure p

## Disclaimer

**The software and related documentation are under active development, all subject to potential future change withoutnotification and not ready for production use. The code and security audit have not been fully completed and not ready for any bug bounty. We advise you to be careful and experiment on the network at your own risk. Stay safe out there.**
**The software and related documentation are under active development, all subject to potential future change without notification and not ready for production use. The code and security audit have not been fully completed and not ready for any bug bounty. We advise you to be careful and experiment on the network at your own risk. Stay safe out there.**

## SP Core

Expand Down
5 changes: 1 addition & 4 deletions base/gfspapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ type GfSpBaseApp struct {
gcZombieRetry int64
gcMetaRetry int64
recoveryRetry int64
migratePieceRetry int64
migrateGVGRetry int64
}

Expand Down Expand Up @@ -156,9 +155,7 @@ func (g *GfSpBaseApp) Start(ctx context.Context) error {
if err != nil {
return err
}
g.Signals(syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP).
StartServices(ctx).
Wait(ctx)
g.Signals(syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP).StartServices(ctx).Wait(ctx)
g.close(ctx)
return nil
}
Expand Down
Loading

0 comments on commit aa43641

Please sign in to comment.