Skip to content

Commit

Permalink
Merge pull request #4207 from weaveworks/Bring-weave-gitops-uptodate
Browse files Browse the repository at this point in the history
Make pipeline green again
  • Loading branch information
casibbald authored Nov 13, 2024
2 parents 1616603 + 471ff1a commit bc082e2
Show file tree
Hide file tree
Showing 24 changed files with 1,876 additions and 1,229 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.20.X]
go-version: [1.23.X]
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: Setup Go
Expand All @@ -70,14 +70,16 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
- run: make unit-tests
# server core fails if ui-tests have not just been run.
# was this all the case
# - run: make lib-test

ci-static:
name: CI Check Static Checks
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.20.X]
go-version: [1.23.X]
node-version: [16.X]
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
Expand Down Expand Up @@ -187,7 +189,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.20.X
go-version: 1.23.X
- name: Checkout code
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: Clean
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prepare-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.20.X
go-version: 1.23.X
- name: Setup Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.20.X
go-version: 1.23.X
- name: Use Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.20.X
go-version: 1.23.X
- name: Run FOSSA scan and upload build data
uses: fossa-contrib/fossa-action@6728dc6fe9a068c648d080c33829ffbe56565023 # v2.0.0
with:
Expand All @@ -46,4 +46,4 @@ jobs:
- name: Autobuild
uses: github/codeql-action/autobuild@04daf014b50eaf774287bf3f0f1869d4b4c4b913 # v2.21.7
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@04daf014b50eaf774287bf3f0f1869d4b4c4b913 # v2.21.7
uses: github/codeql-action/analyze@04daf014b50eaf774287bf3f0f1869d4b4c4b913 # v2.21.7
2 changes: 1 addition & 1 deletion .github/workflows/upgrade-flux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.20.X
go-version: 1.23.X
- name: Upgrade flux
run: |
sed -i 's/^FLUX_VERSION=.*/FLUX_VERSION=${{ needs.has-new-flux.outputs.version }}/' Makefile
Expand Down
4 changes: 2 additions & 2 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
run:
timeout: 5m
go: '1.20'
go: '1.23'

linters:
disable-all: true
Expand Down Expand Up @@ -83,7 +83,7 @@ linters-settings:
- performance
- style
gofumpt:
lang-version: "1.20"
lang-version: "1.23"
extra-rules: true
lll:
line-length: 150
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BUILD_TIME?=$(shell date +'%Y-%m-%d_%T')
BRANCH?=$(shell which git > /dev/null && git rev-parse --abbrev-ref HEAD)
GIT_COMMIT?=$(shell which git > /dev/null && git log -n1 --pretty='%h')
VERSION?=$(shell which git > /dev/null && git describe --always --match "v*")
FLUX_VERSION=2.0.1
FLUX_VERSION=2.3.0
CHART_VERSION=$(shell which yq > /dev/null && yq e '.version' charts/gitops-server/Chart.yaml)
TIER=oss

Expand Down Expand Up @@ -110,7 +110,7 @@ vet: ## Run go vet against code
go vet ./...

lint: ## Run linters against code
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52.0
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.0
golangci-lint run --out-format=github-actions --timeout 600s --skip-files "tilt_modules"
@go install github.com/yoheimuta/protolint/cmd/protolint@latest
protolint lint -config_path=.protolint.yaml ./api
Expand Down
4 changes: 2 additions & 2 deletions buf.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ deps:
- remote: buf.build
owner: googleapis
repository: googleapis
commit: 28151c0d0a1641bf938a7672c500e01d
commit: f52d4f76a8434cc5966798b1d3b4f110
- remote: buf.build
owner: grpc-ecosystem
repository: grpc-gateway
commit: 3f42134f4c564983838425bc43c7a65f
commit: a48fcebcf8f140dd9d09359b9bb185a4
4 changes: 2 additions & 2 deletions core/server/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ func list(ctx context.Context, k8s clustersmngr.Client, appName, namespace strin

func wrapK8sAPIError(msg string, err error) error {
if k8serrors.IsUnauthorized(err) {
return status.Errorf(codes.PermissionDenied, err.Error())
return status.Errorf(codes.PermissionDenied, "%s", err.Error())
} else if k8serrors.IsNotFound(err) {
return status.Errorf(codes.NotFound, err.Error())
return status.Errorf(codes.NotFound, "%s", err.Error())
} else if err != nil {
return fmt.Errorf("%s: %w", msg, err)
}
Expand Down
2 changes: 1 addition & 1 deletion core/server/sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func TestSync(t *testing.T) {

case err := <-done:
if err != nil {
t.Errorf(err.Error())
t.Error(err)
}
return
}
Expand Down
2 changes: 1 addition & 1 deletion gitops-bucket-server.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Go build
FROM golang:1.20 AS go-build
FROM golang:1.23 AS go-build

# Add known_hosts entries for GitHub and GitLab
RUN mkdir ~/.ssh
Expand Down
2 changes: 1 addition & 1 deletion gitops-server.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ COPY --chown=node:node ui /home/app/ui
RUN --mount=type=cache,target=/home/app/ui/.parcel-cache make ui

# Go build
FROM golang:1.20 AS go-build
FROM golang:1.23 AS go-build

# Add known_hosts entries for GitHub and GitLab
RUN mkdir ~/.ssh
Expand Down
2 changes: 1 addition & 1 deletion gitops.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG FLUX_CLI=ghcr.io/fluxcd/flux-cli:v$FLUX_VERSION
FROM $FLUX_CLI as flux

# Go build
FROM golang:1.20 AS go-build
FROM golang:1.23 AS go-build

# Add known_hosts entries for GitHub and GitLab
RUN mkdir ~/.ssh
Expand Down
18 changes: 9 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/weaveworks/weave-gitops

go 1.20
go 1.23

require (
github.com/Masterminds/semver/v3 v3.2.1
Expand Down Expand Up @@ -46,7 +46,7 @@ require (
github.com/weaveworks/tf-controller/tfctl v0.0.0-20231228180612-918cb6250720
github.com/yannh/kubeconform v0.5.0
go.uber.org/zap v1.26.0
golang.org/x/crypto v0.16.0
golang.org/x/crypto v0.23.0
golang.org/x/oauth2 v0.15.0
google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97
google.golang.org/grpc v1.58.2
Expand Down Expand Up @@ -109,7 +109,7 @@ require (
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sync v0.7.0 // indirect
google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect
gopkg.in/evanphx/json-patch.v5 v5.7.0 // indirect
Expand Down Expand Up @@ -195,13 +195,13 @@ require (
github.com/xlab/treeprint v1.2.0 // indirect
go.starlark.net v0.0.0-20231121155337-90ade8b19d09 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.19.0
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0
golang.org/x/text v0.14.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.25.0
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.20.0
golang.org/x/text v0.15.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.16.0 // indirect
golang.org/x/tools v0.21.1-0.20240531212143-b6235391adb3 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
Expand Down
Loading

0 comments on commit bc082e2

Please sign in to comment.