Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/back-port.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
# align with crossplane's choice https://github.com/crossplane/crossplane/blob/master/.github/workflows/backport.yml
open-pr:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
if: github.event.pull_request.merged
steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
publish-charts:
env:
HELM_CHART: charts/vela-workflow
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@master
- name: Get the vars
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ on:

env:
# Common versions
GO_VERSION: '1.22'
GOLANGCI_VERSION: 'v1.59'
GO_VERSION: '1.23.8'
GOLANGCI_VERSION: 'v1.60.1'
K3D_IMAGE_VERSION: '[\"v1.29\"]'
K3D_IMAGE_VERSIONS: '[\"v1.29\"]'

jobs:

detect-noop:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ on:

env:
# Common versions
GO_VERSION: '1.22'
GOLANGCI_VERSION: 'v1.59'
GO_VERSION: '1.23.8'
GOLANGCI_VERSION: 'v1.60.1'

jobs:

detect-noop:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
Expand All @@ -33,7 +33,7 @@ jobs:
concurrent_skipping: false

staticcheck:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'

Expand All @@ -56,13 +56,13 @@ jobs:
restore-keys: ${{ runner.os }}-pkg-

- name: Install StaticCheck
run: go install honnef.co/go/tools/cmd/staticcheck@2023.1.7
run: go install honnef.co/go/tools/cmd/staticcheck@v0.5.1

- name: Static Check
run: staticcheck ./...

lint:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue-commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
bot:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout Actions
uses: actions/checkout@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/post-submit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ on:
workflow_dispatch: {}

env:
GO_VERSION: '1.22'
GO_VERSION: '1.23.8'

jobs:

detect-noop:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
Expand All @@ -26,7 +26,7 @@ jobs:
concurrent_skipping: false

image-multi-arch:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
strategy:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/unit-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ on:

env:
# Common versions
GO_VERSION: '1.22'
GOLANGCI_VERSION: 'v1.59'
GO_VERSION: '1.23.8'
GOLANGCI_VERSION: 'v1.60.1'
KIND_VERSION: 'v0.23.0'

jobs:

detect-noop:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
Expand All @@ -34,7 +34,7 @@ jobs:
concurrent_skipping: false

unit-tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'

Expand Down
24 changes: 13 additions & 11 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
run:
timeout: 10m

skip-files:
- "zz_generated\\..+\\.go$"
- ".*_test.go$"

skip-dirs:
- "hack"
- "e2e"

output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: colored-line-number
formats: colored-line-number

linters-settings:
errcheck:
Expand All @@ -26,7 +18,7 @@ linters-settings:
# [deprecated] comma-separated list of pairs of the form pkg:regex
# the regex is used to ignore names within pkg. (default "fmt:.*").
# see https://github.com/kisielk/errcheck#the-deprecated-method for details
ignore: fmt:.*,io/ioutil:^Read.*
exclude-functions: fmt:.*,io/ioutil:^Read.*

exhaustive:
# indicates that switch statements are to be considered exhaustive if a
Expand Down Expand Up @@ -105,7 +97,6 @@ linters-settings:

linters:
enable:
- megacheck
- govet
- gocyclo
- gocritic
Expand All @@ -116,10 +107,21 @@ linters:
- unconvert
- misspell
- nakedret
- gosimple
- staticcheck
fast: false


issues:

exclude-files:
- "zz_generated\\..+\\.go$"
- ".*_test.go$"

exclude-dirs:
- "hack"
- "e2e"

# Excluding configuration per-path and per-linter
exclude-rules:
# Exclude some linters from running on tests files.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG BASE_IMAGE
# Build the manager binary
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.22-alpine as builder
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.23.8-alpine3.21 as builder
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.e2e
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG BASE_IMAGE
# Build the manager binary
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.22-alpine as builder
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.23.8-alpine3.21 as builder
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
Expand Down
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func main() {
}
}()

if err := pprofServer.ListenAndServe(); !errors.Is(http.ErrServerClosed, err) {
if err := pprofServer.ListenAndServe(); !errors.Is(err, http.ErrServerClosed) {
klog.Error(err, "Failed to start debug HTTP server")
panic(err)
}
Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/kubevela/workflow

go 1.22.0

toolchain go1.22.5
go 1.23.8

require (
cuelang.org/go v0.9.2
Expand Down
4 changes: 2 additions & 2 deletions makefiles/dependency.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ifeq (, $(shell which staticcheck))
@{ \
set -e ;\
echo 'installing honnef.co/go/tools/cmd/staticcheck ' ;\
go install honnef.co/go/tools/cmd/staticcheck@2023.1.7 ;\
go install honnef.co/go/tools/cmd/staticcheck@v0.5.1 ;\
}
STATICCHECK=$(GOBIN)/staticcheck
else
Expand All @@ -58,7 +58,7 @@ else
GOIMPORTS=$(shell which goimports)
endif

GOLANGCILINT_VERSION ?= v1.59.0
GOLANGCILINT_VERSION ?= v1.60.0

.PHONY: golangci
golangci:
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/legacy/metrics/prom_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func getQueryResult(ctx context.Context, vars PromVars) (string, error) {
valueStr = v.Value.String()
case prommodel.Vector:
if len(v) != 1 {
return "", fmt.Errorf(fmt.Sprintf("ehe query is returning %d results when it should only return one. Please review the query to identify and fix the issue", len(v)))
return "", fmt.Errorf("the query is returning %d results when it should only return one. Please review the query to identify and fix the issue", len(v))
}
valueStr = v[0].Value.String()
default:
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/metrics/prom_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func getQueryResult(ctx context.Context, vars PromVars) (string, error) {
valueStr = v.Value.String()
case prommodel.Vector:
if len(v) != 1 {
return "", fmt.Errorf(fmt.Sprintf("ehe query is returning %d results when it should only return one. Please review the query to identify and fix the issue", len(v)))
return "", fmt.Errorf("the query is returning %d results when it should only return one. Please review the query to identify and fix the issue", len(v))
}
valueStr = v[0].Value.String()
default:
Expand Down
2 changes: 1 addition & 1 deletion pkg/webhook/v1alpha1/workflowrun/validating_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func mergeErrors(errs field.ErrorList) error {
for _, err := range errs {
s += fmt.Sprintf("field \"%s\": %s error encountered, %s. ", err.Field, err.Type, err.Detail)
}
return fmt.Errorf(s)
return fmt.Errorf("%s", s)
}

// Handle validate Application Spec here
Expand Down
Loading