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

enter_modify #342

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c0a38f1
[fix]playbook/memcached
Cyber-SiKu Feb 22, 2023
10994d9
[fix]playbook/memcached
Cyber-SiKu Feb 22, 2023
de36749
Feature: support managing disk information in database
Mar 3, 2023
af342de
Merge pull request #188 from legionxiong/new-disk-format
tsonglew Mar 3, 2023
2c50545
Feature: support direct disk mounting for service container
Mar 19, 2023
397fc08
Merge pull request #201 from legionxiong/auto-mount-disk
tsonglew Apr 10, 2023
78c415a
[feat] add toolsv2
Cyber-SiKu Feb 28, 2023
d7db7c6
[feat]curvefs/curvebs: auto restart&mount
Cyber-SiKu Mar 7, 2023
050eb05
Fix: remove deprecated ioutil
fengshunli May 19, 2023
5feab2c
Fix: update package dependencies
fengshunli May 17, 2023
5c622b9
Feat: add golangci-lint
fengshunli May 17, 2023
62d83a2
Fix: format code
fengshunli May 30, 2023
f90ed57
Merge pull request #236 from fengshunli/code
caoxianfei1 May 31, 2023
9e46bbe
feature(curvebs): support poolset
jolly-sy Nov 28, 2022
8fa1398
[fix] repace harbor with opencurve
Cyber-SiKu Jun 21, 2023
26a6b3c
support deploy monitor
SeanHai Apr 26, 2023
c896257
add http service
SeanHai Apr 23, 2023
1ab4aac
support deploy website
SeanHai May 8, 2023
7cee1b6
Merge pull request #250 from SeanHai/curve-manager
SeanHai Jun 25, 2023
15076a4
[fix] update the example
montaguelhz Jun 25, 2023
e150a3b
fix clean monitor
SeanHai Jul 4, 2023
d750c94
Merge pull request #262 from SeanHai/auth
SeanHai Jul 4, 2023
8c55ada
fix generate target.json when curvefs
SeanHai Jul 6, 2023
60cee71
Merge pull request #264 from SeanHai/auth
SeanHai Jul 6, 2023
7d3bd4b
add dirs http service need
SeanHai Jul 14, 2023
3b6b0a1
Merge pull request #276 from SeanHai/auth
SeanHai Jul 14, 2023
dc048d1
support enable etcd auth
SeanHai Aug 3, 2023
eeda84f
[fix]playbook: fix format related variables position
Songjf-ttk Aug 30, 2023
df9eea9
[fix] add support for recognizing kernel versions like "3.15.0_.*"
jyf111 Aug 30, 2023
b1c5562
Merge pull request #305 from Songjf-ttk/fixposition
caoxianfei1 Aug 31, 2023
dbe508e
Merge pull request #306 from jyf111/fix-kernel-version
caoxianfei1 Aug 31, 2023
956c953
Merge pull request #281 from SeanHai/auth
SeanHai Aug 31, 2023
bc5ef37
Feature: podman can be an alternative container engine
caoxianfei1 Aug 10, 2023
061b6e4
bugfix: docker ps specify both --format and --quiet will warning sinc…
caoxianfei1 Aug 11, 2023
7401855
change replicas to instances
tiansuo114 Aug 27, 2023
28dd6b0
Update cli/command/status.go
Wine93 Sep 1, 2023
a13b532
[fix] older versions of the ss command do not have the --no-header op…
jyf111 Aug 19, 2023
de8f69d
[CI] add basic static check, compile, test
357447923 Aug 16, 2023
14c8166
[feat]curveadm: add clean command for bs format
Songjf-ttk Oct 7, 2023
8fc6f47
enter_modify
LYPWYT Nov 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/CodeQL.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: "CodeQL"

on:
push:
branches: [ "master","develop" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master","develop" ]
schedule:
- cron: '0 17 * * 5'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
# timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
26 changes: 20 additions & 6 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,43 @@ on:
branches: [ $default-branch, "develop" ]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: '1.19'
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup golangci-lint
uses: golangci/[email protected]
with:
version: v1.52.2
args: --verbose

test:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: Generate SSH key
run: ssh-keygen -f ~/.ssh/id_rsa -P ""
- name: Test
run: make test

build:
needs: test
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Set dependencies
run: sudo apt update && sudo apt install musl-tools
go-version: 1.19
- name: Build
run: make build
run: go build -v ./...
38 changes: 38 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
run:
timeout: 5m
linters:
enable:
# Simple linter to check that your code does not contain non-ASCII identifiers.
- asciicheck
# Go linter that checks if package imports are in a list of acceptable packages.
- depguard
# Checks for pointers to enclosing loop variables.
- exportloopref
# Gofmt checks whether code was gofmt-ed
- gofmt
# Inspects source code for security problems.
- gosec
# Finds naked returns in functions greater than a specified function length.
- nakedret
# Reports ill-formed or insufficient nolint directives.
- nolintlint
# Checks for dangerous unicode character sequences.
- bidichk
disable:
# ignore errcheck
- errcheck
linters-settings:
gosec:
# Available rules: https://github.com/securego/gosec#available-rules
excludes:
- G101 # Look for hard coded credentials
- G204 # Audit use of command execution
- G401 # Detect the usage of DES, RC4, MD5 or SHA1
- G403 # Ensure minimum RSA key length of 2048 bits
- G404 # Insecure random number source (rand)
- G501 # Import blocklist: crypto/md5
- G502 # Import blocklist: crypto/des
- G503 # Import blocklist: crypto/rc4
- G504 # Import blocklist: net/http/cgi
- G505 # Import blocklist: crypto/sha1
- G601 # Implicit memory aliasing of items from a range statement
24 changes: 21 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ GOENV += GOPROXY=$(GOPROXY)
GOENV += CC=$(CC)
GOENV += CGO_ENABLED=1 CGO_LDFLAGS=$(CGO_LDFLAGS)
GOENV += GOOS=$(GOOS) GOARCH=$(GOARCH)

GOLANGCILINT_VERSION ?= v1.50.0
GOBIN := $(shell go env GOPATH)/bin
GOBIN_GOLANGCILINT := $(shell which $(GOBIN)/golangci-lint)
# go
GO := go

# output
OUTPUT := bin/curveadm
SERVER_OUTPUT := bin/pigeon

# build flags
LDFLAGS := -s -w
Expand Down Expand Up @@ -48,18 +51,33 @@ TEST_FLAGS += -run $(CASE)

# packages
PACKAGES := $(PWD)/cmd/curveadm/main.go
SERVER_PACKAGES := $(PWD)/cmd/service/main.go

# tar
VERSION := "unknown"

build:
build: fmt vet
$(GOENV) $(GO) build -o $(OUTPUT) $(BUILD_FLAGS) $(PACKAGES)
$(GOENV) $(GO) build -o $(SERVER_OUTPUT) $(BUILD_FLAGS) $(SERVER_PACKAGES)


debug:
debug: fmt vet
$(GOENV) $(GO) build -o $(OUTPUT) $(DEBUG_FLAGS) $(PACKAGES)
$(GOENV) $(GO) build -o $(SERVER_OUTPUT) $(DEBUG_FLAGS) $(SERVER_PACKAGES)


test:
$(GO_TEST) $(TEST_FLAGS) ./...

upload:
@NOSCMD=$(NOSCMD) bash build/package/upload.sh $(VERSION)

lint:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCILINT_VERSION)
$(GOBIN_GOLANGCILINT) run -v

fmt:
go fmt ./...

vet:
go vet ./...
4 changes: 3 additions & 1 deletion build/package/upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ g_nos_cmd=${NOSCMD}
g_root=$(pwd)/.build
g_curveadm=${g_root}/curveadm
g_curveadm_bin=${g_curveadm}/bin
g_curveadm_http_bin=${g_curveadm}/http
rm -rf ${g_root}

mkdir -p ${g_curveadm_bin}
mkdir -p ${g_curveadm_bin} ${g_curveadm_http_bin}
cp bin/curveadm ${g_curveadm_bin}
cp bin/pigeon ${g_curveadm_http_bin}
[[ -f .CHANGELOG ]] && cp .CHANGELOG ${g_curveadm}/CHANGELOG
(cd ${g_curveadm} && ./bin/curveadm -v && ls -ls bin/curveadm && [[ -f CHANGELOG ]] && cat CHANGELOG)
(cd ${g_root} && tar -zcf curveadm-${g_version}.tar.gz curveadm)
Expand Down
Loading