Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into SD_utilize
Browse files Browse the repository at this point in the history
  • Loading branch information
batphonghan committed Feb 26, 2024
2 parents 775d934 + 6e01c23 commit caef917
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 53 deletions.
81 changes: 36 additions & 45 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,49 +10,40 @@ on:
branches: ["main"]

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Go 1.19
uses: actions/setup-go@v5
with:
go-version: '1.19'
cache: false

- name: Golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: latest
args: --timeout 3m --verbose --config=.golangci.yml --out-${NO_FUTURE}format colored-line-number
only-new-issues: true
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19

- name: Test with the Go CLI
run: go test ./...

- name: Golangci
uses: golangci/golangci-lint-action@v3
with:
# Require: The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
version: latest

# Optional: working directory, useful for monorepos
# working-directory: somedir

# Optional: golangci-lint command line arguments.
#
# Note: By default, the `.golangci.yml` file should be at the root of the repository.
# The location of the configuration file can be changed by using `--config=`
# args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0

args: --timeout 3m --verbose
# Optional: show only new issues if it's a pull request. The default value is `false`.
only-new-issues: true

# Optional: if set to true, then all caching functionality will be completely disabled,
# takes precedence over all other caching options.
# skip-cache: true

# Optional: if set to true, then the action won't cache or restore ~/go/pkg.
# skip-pkg-cache: true

# Optional: if set to true, then the action won't cache or restore ~/.cache/go-build.
# skip-build-cache: true

# Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'.
# install-mode: "goinstall"
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: '1.19'
cache: false

- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Test
run: go test -v ./...
6 changes: 3 additions & 3 deletions install/override/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ networks:
ipam:
driver: default
config:
- subnet: 192.168.1.0/16
ip_range: 192.168.5.0/24
gateway: 192.168.5.254
- subnet: 172.23.0.0/16
ip_range: 172.23.5.0/24
gateway: 172.23.5.254
6 changes: 3 additions & 3 deletions install/templates/prometheus.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ networks:
ipam:
driver: default
config:
- subnet: 192.168.1.0/16
ip_range: 192.168.5.0/24
gateway: 192.168.5.254
- subnet: 172.23.0.0/16
ip_range: 172.23.5.0/24
gateway: 172.23.5.254
net:
volumes:
prometheus-data:
4 changes: 2 additions & 2 deletions shared/services/config/prysm-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
)

const (
prysmBnTagTest string = "staderlabs/prysm:v4.2.1"
prysmVcTagTest string = "staderlabs/prysm:v4.2.1"
prysmBnTagTest string = "staderlabs/prysm:v5.0.0"
prysmVcTagTest string = "staderlabs/prysm:v5.0.0"

prysmBnTagProd string = "staderlabs/prysm:v4.2.1"
prysmVcTagProd string = "staderlabs/prysm:v4.2.1"
Expand Down
10 changes: 10 additions & 0 deletions stader-cli/service/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ func migrate(c *cli.Context) (runBeforeUpgrades, rundAfterUpgrades []ConfigUpgra
return nil, nil, err
}

v1410, err := parseVersion("1.4.10")
if err != nil {
return nil, nil, err
}

// Create the collection of upgraders
upgraders := []ConfigUpgrader{
{
Expand All @@ -80,6 +85,11 @@ func migrate(c *cli.Context) (runBeforeUpgrades, rundAfterUpgrades []ConfigUpgra
upgradeFunc: func(c *cli.Context) error { return nil },
needInstall: true,
},
{
version: v1410,
upgradeFunc: func(c *cli.Context) error { return nil },
needInstall: true,
},
}

staderClient, err := stader.NewClientFromCtx(c)
Expand Down

0 comments on commit caef917

Please sign in to comment.