Skip to content

Commit

Permalink
chore!: update dependencies
Browse files Browse the repository at this point in the history
Raise minimum required Go version to Go 1.21 due to ariga.io/atlas.
For those unable to use the latest version of Go (e.g. Debian Bookworm),
it is recommended to switch to the prebuilt binaries.

Signed-off-by: Michael Adler <michael.adler@siemens.com>
  • Loading branch information
michaeladler authored and stormc committed Jan 15, 2024
1 parent 9140600 commit a756aaa
Show file tree
Hide file tree
Showing 20 changed files with 566 additions and 496 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: ["stable", "1.19"]
go: ["stable"]
name: Build (Go ${{ matrix.go }})
steps:
- uses: actions/checkout@v4
Expand All @@ -26,14 +26,16 @@ jobs:
- run: |
# goreleaser requires an absolute path to the compiler
install -m0755 .ci/zcc /usr/local/bin/zcc
- name: build
- name: build wfx
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: build --clean --single-target --snapshot
env:
CC: /usr/local/bin/zcc
- name: build plugins and contrib
run: make -s plugins contrib

test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -125,7 +127,7 @@ jobs:
cli-tests:
name: CLI Tests
runs-on: ubuntu-latest
container: debian:bookworm-slim
container: debian:testing-slim
services:
mysql:
image: mysql:8-debian
Expand Down Expand Up @@ -217,6 +219,6 @@ jobs:
run: git config --global safe.directory '*'
- uses: brokeyourbike/go-mockery-action@v0
with:
mockery-version: "2.36.0"
mockery-version: "2.39.2"
- run: just generate
- run: git diff --exit-code
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ linters:

linters-settings:
staticcheck:
go: "1.19"
go: "1.21"
# https://staticcheck.io/docs/options#checks
checks: ["all", "-ST1000", "-SA1019"]
misspell:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Refactored `wfxctl workflow delete` command to accept workflows as arguments instead of positional parameters
- Prefer cgroup CPU quota over host CPU count
- Empty or `null` arrays are omitted from JSON responses
- Build requires Go >= 1.21

### Removed

Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ wfx wfxctl wfx-loadtest wfx-viewer:
-ldflags '$(LD_FLAGS) -X github.com/siemens/wfx/cmd/$@/metadata.Commit=$(shell git rev-parse HEAD | tr -d [:space:]) -X github.com/siemens/wfx/cmd/$@/metadata.Date=$(shell date -Iseconds)' \
./cmd/$@

.PHONY: plugins
plugins:
cd example/plugin && go build

.PHONY: contrib
contrib:
make -s -C contrib/remote-access
make -s -C contrib/config-deployment

.PHONY: clean
clean:
@$(RM) $(ALL_TARGETS) *.exe
Expand Down
6 changes: 4 additions & 2 deletions cmd/wfxctl/cmd/job/events/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ package events

import (
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
Expand Down Expand Up @@ -101,7 +102,8 @@ func (t SSETransport) Submit(op *runtime.ClientOperation) (interface{}, error) {
defer unsubscribe()

err := conn.Connect()
if err != nil {
if err != nil && !errors.Is(err, io.EOF) {
log.Error().Err(err).Msg("Failed to connect to remote server")
return nil, fault.Wrap(err)
}

Expand Down Expand Up @@ -139,7 +141,7 @@ wfxctl job events --job-id=1 --job-id=2 --client-id=foo
transport := SSETransport{baseCmd: &baseCmd, out: cmd.OutOrStderr()}
executor := generatedClient.New(transport, strfmt.Default)
if _, err := executor.Jobs.GetJobsEvents(params); err != nil {
log.Fatal().Msg("Failed to subscribe to job events")
log.Fatal().Err(err).Msg("Failed to subscribe to job events")
}
},
}
2 changes: 1 addition & 1 deletion cmd/wfxctl/cmd/job/events/events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func TestSubscribeJobStatus(t *testing.T) {
`))
}))
defer ts.Close()
t.Cleanup(ts.Close)

u, _ := url.Parse(ts.URL)
_ = flags.Koanf.Set(flags.ClientHostFlag, u.Hostname())
Expand Down
36 changes: 18 additions & 18 deletions contrib/config-deployment/client/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,37 @@ module github.com/siemens/wfx/contrib/config-deployment/client

replace github.com/siemens/wfx => ../../..

go 1.19
go 1.21

require (
github.com/cavaliergopher/grab/v3 v3.0.1
github.com/go-openapi/strfmt v0.21.7
github.com/siemens/wfx v0.0.0-00010101000000-000000000000
github.com/go-openapi/strfmt v0.22.0
github.com/siemens/wfx v0.1.0
github.com/spf13/pflag v1.0.5
)

require (
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/analysis v0.21.4 // indirect
github.com/go-openapi/errors v0.20.4 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/loads v0.21.2 // indirect
github.com/go-openapi/runtime v0.26.0 // indirect
github.com/go-openapi/spec v0.20.9 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/go-openapi/validate v0.22.1 // indirect
github.com/go-openapi/analysis v0.22.2 // indirect
github.com/go-openapi/errors v0.21.0 // indirect
github.com/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/jsonreference v0.20.4 // indirect
github.com/go-openapi/loads v0.21.5 // indirect
github.com/go-openapi/runtime v0.26.2 // indirect
github.com/go-openapi/spec v0.20.14 // indirect
github.com/go-openapi/swag v0.22.7 // indirect
github.com/go-openapi/validate v0.22.6 // indirect
github.com/google/uuid v1.5.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
go.mongodb.org/mongo-driver v1.11.6 // indirect
go.opentelemetry.io/otel v1.16.0 // indirect
go.opentelemetry.io/otel/metric v1.16.0 // indirect
go.opentelemetry.io/otel/trace v1.16.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
go.mongodb.org/mongo-driver v1.13.1 // indirect
go.opentelemetry.io/otel v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.21.0 // indirect
go.opentelemetry.io/otel/trace v1.21.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit a756aaa

Please sign in to comment.