Skip to content

Commit

Permalink
[Test]In case of failure of any job in the matrix, other jobs continu…
Browse files Browse the repository at this point in the history
…e to execute.

Signed-off-by: panyintian.fu <[email protected]>
  • Loading branch information
panyintian.fu committed Feb 17, 2025
1 parent abe65a2 commit fea7d88
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 52 deletions.
1 change: 1 addition & 0 deletions .github/workflows/e2e_schedule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
needs: build-push-for-e2e
runs-on: [self-hosted, online]
strategy:
fail-fast: false
matrix:
NIGHTLY_E2E_STEP: [ "STEP1", "STEP2", "STEP3", "network-e2e-step1" , "network-e2e-step2", "network-e2e-step3", "network-e2e-step4", "network-e2e-step5" , "network-e2e-step6" , "network-e2e-step7" , "network-e2e-step8", "network-e2e-step9"]
timeout-minutes: 900
Expand Down
48 changes: 2 additions & 46 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ run:
# The default concurrency value is the number of available CPU.
concurrency: 4

# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs-use-default: true

# One of 'readonly' and 'vendor'.
# - readonly: the go command is disallowed from the implicit automatic updating of go.mod described above.
# Instead, it fails when any changes to go.mod are needed. This setting is most useful to check
Expand Down Expand Up @@ -89,55 +85,15 @@ linters-settings:
- G601

output:
formats: colored-line-number
formats:
- format: colored-line-number
print-issued-lines: true
print-linter-name: true
uniq-by-line: true
sort-results: true

linters:
disable-all: true
disabled:
- exhaustivestruct # Checks if all struct's fields are initialized
- forbidigo # Forbids identifiers
- forcetypeassert # finds forced type assertions
- gci # Gci control golang package import order and make it always deterministic.
- gochecknoglobals # check that no global variables exist
- gochecknoinits # Checks that no init functions are present in Go code
- goconst # Finds repeated strings that could be replaced by a constant
- godox # Tool for detection of FIXME, TODO and other comment keywords
- goerr113 # Golang linter to check the errors handling expressions
- golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
- gomnd # An analyzer to detect magic numbers.
- gomoddirectives # Manage the use of 'replace', 'retract', and 'excludes' directives in go.mod.
- gomodguard # Allow and block list linter for direct Go module dependencies.
- interfacer # Linter that suggests narrower interface types
- lll # Reports long lines
- maligned # Tool to detect Go structs that would take less memory if their fields were sorted
- promlinter # Check Prometheus metrics naming via promlint
- scopelint # Scopelint checks for unpinned variables in go programs
- sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed.
- testpackage # Linter that makes you use a separate _test package
- tparallel # tparallel detects inappropriate usage of t.Parallel() method in your Go test codes
- wrapcheck # Checks that errors returned from external packages are wrapped
- wsl # Whitespace Linter
- paralleltest # paralleltest detects missing usage of t.Parallel() method in your Go test
- noctx # noctx finds sending http request without context.Context
- wastedassign # wastedassign finds wasted assignment statements.
- exhaustive # check exhaustiveness of enum switch statements
- cyclop # checks function and package cyclomatic complexity
- errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
- unparam # Reports unused function parameters
- funlen # Tool for detection of long functions
- gocognit # Computes and checks the cognitive complexity of functions
- gocyclo # Computes and checks the cyclomatic complexity of functions
- nlreturn # nlreturn checks for a new line before return and branch statements to increase code clarity
- gocritic # Provides many diagnostics that check for bugs, performance and style issues.
- nestif # Reports deeply nested if statements
- bodyclose # checks whether HTTP response body is closed successfully
- errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13.
- tagliatelle # Checks the struct tags.
- depguard # Go linter that checks if package imports are in a list of acceptable packages
enable:
- asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
- dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
Expand Down
8 changes: 4 additions & 4 deletions hack/run-nightly-cluster-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,20 +146,20 @@ func_prepare_config_yaml "${SOURCE_CONFIG_PATH}" "${dest_config_path}"
CLUSTER_OPERATION_NAME1="cluster1-install-"`date "+%H-%M-%S"`

# set vars-conf-cm.yml
sed -i "s/v1.30.5/v1.29.5/" "${dest_config_path}"/vars-conf-cm.yml
sed -i "s/v1.30.5/v1.30.0/" "${dest_config_path}"/vars-conf-cm.yml

sed -i "s/e2e-cluster1-install/${CLUSTER_OPERATION_NAME1}/" "${dest_config_path}"/kubeanClusterOps.yml


## prepare cluster upgrade job yml --> upgrade from v1.29.5 to v1.30.0
## prepare cluster upgrade job yml --> upgrade from v1.30.0 to v1.30.2
dest_config_path="${REPO_ROOT}"/test/kubean_sonobouy_nightlye2e/e2e-upgrade-cluster-y/
func_prepare_config_yaml "${SOURCE_CONFIG_PATH}" "${dest_config_path}"
CLUSTER_OPERATION_NAME2="cluster1-upgrade-y"
sed -i "s/e2e-cluster1-install/${CLUSTER_OPERATION_NAME2}/" "${dest_config_path}"/kubeanClusterOps.yml
sed -i "s/cluster.yml/upgrade-cluster.yml/" "${dest_config_path}"/kubeanClusterOps.yml
sed -i "s/v1.30.5/v1.30.0/" "${dest_config_path}"/vars-conf-cm.yml
sed -i "s/v1.30.5/v1.30.2/" "${dest_config_path}"/vars-conf-cm.yml

## prepare cluster upgrade job yml --> upgrade from v1.30.0 to v1.30.4
## prepare cluster upgrade job yml --> upgrade from v1.30.2 to v1.30.5
dest_config_path="${REPO_ROOT}"/test/kubean_sonobouy_nightlye2e/e2e-upgrade-cluster-z/
func_prepare_config_yaml "${SOURCE_CONFIG_PATH}" "${dest_config_path}"
CLUSTER_OPERATION_NAME3="cluster1-upgrade-z"
Expand Down
4 changes: 2 additions & 2 deletions test/tools/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ const (
)

const (
OriginK8Version = "v1.29.5"
UpgradeK8Version_Y = "v1.30.0"
OriginK8Version = "v1.30.0"
UpgradeK8Version_Y = "v1.30.2"
UpgradeK8Version_Z = "v1.30.5"
NginxAlpha = "release-ci.daocloud.io/kubean/nginx:alpine"
E2eInstallClusterYamlFolder = "e2e-install-cluster"
Expand Down

0 comments on commit fea7d88

Please sign in to comment.