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/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Set up Go
uses: actions/[email protected]
with:
go-version: '1.21'
go-version: '1.23'
- uses: actions/checkout@v4
- name: Setup k3s
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Set up Go
uses: actions/[email protected]
with:
go-version: '1.21'
go-version: '1.23'
- name: build
run: |
pip install mkdocs mkdocs_material
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- "master"
env:
# Golang version to use across CI steps
GOLANG_VERSION: '1.21'
GOLANG_VERSION: '1.23'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -35,22 +35,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5.0.0
uses: actions/setup-go@v5.4.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Checkout code
uses: actions/checkout@v4
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v8
with:
version: v1.57.2
version: v2.1.6
args: --timeout 6m
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5.0.0
uses: actions/setup-go@v5.4.0
with:
go-version: ${{ env.GOLANG_VERSION }}
id: go
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Golang
uses: actions/setup-go@v5.0.0
uses: actions/setup-go@v5.4.0
with:
go-version: ${{ env.GOLANG_VERSION }}
# k8s codegen generates files into GOPATH location instead of the GitHub git checkout location
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@v4
with:
go-version: 1.21
go-version: 1.23

- name: Generate release artifacts
run: |
Expand Down
49 changes: 35 additions & 14 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,41 @@
version: "2"
run:
deadline: 1m
skip-files:
- ".*\\.pb\\.go"
skip-dirs:
- pkg/client
modules-download-mode: readonly
linter-settings:
goimports:
local-prefixes: github.com/argoproj/argo-rollouts
timeout: 10m
linters:
default: none
enable:
- vet
- gofmt
- goimports
- unused
- govet
- ineffassign
- unconvert
- misspell
disable-all: true
- unconvert
- unused
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- .*\.pb\.go
- pkg/client
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt
- goimports
settings:
goimports:
local-prefixes:
- github.com/argoproj/argo-rollouts
exclusions:
generated: lax
paths:
- .*\.pb\.go
- pkg/client
- third_party$
- builtin$
- examples$
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Initial stage which pulls prepares build dependencies and CLI tooling we need for our final image
# Also used as the image in CI jobs so needs all dependencies
####################################################################################################
FROM --platform=$BUILDPLATFORM golang:1.21 as builder
FROM --platform=$BUILDPLATFORM golang:1.23 as builder

RUN apt-get update && apt-get install -y \
wget \
Expand All @@ -12,7 +12,7 @@ RUN apt-get update && apt-get install -y \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Install golangci-lint
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.57.2 && \
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.1.6 && \
golangci-lint linters

COPY .golangci.yml ${GOPATH}/src/dummy/.golangci.yml
Expand Down Expand Up @@ -40,7 +40,7 @@ RUN NODE_ENV='production' yarn build
####################################################################################################
# Rollout Controller Build stage which performs the actual build of argo-rollouts binaries
####################################################################################################
FROM --platform=$BUILDPLATFORM golang:1.21 as argo-rollouts-build
FROM --platform=$BUILDPLATFORM golang:1.23 as argo-rollouts-build

WORKDIR /go/src/github.com/argoproj/argo-rollouts

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.7.2-CR-29629
v1.7.2-OSS-697
5 changes: 3 additions & 2 deletions analysis/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import (
"sync"
"time"

"github.com/argoproj/argo-rollouts/metric"
jobProvider "github.com/argoproj/argo-rollouts/metricproviders/job"
"github.com/aws/smithy-go/ptr"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"

"github.com/argoproj/argo-rollouts/metric"
jobProvider "github.com/argoproj/argo-rollouts/metricproviders/job"

unstructuredutil "github.com/argoproj/argo-rollouts/utils/unstructured"

log "github.com/sirupsen/logrus"
Expand Down
3 changes: 2 additions & 1 deletion cmd/kubectl-argo-rollouts/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ package main
import (
"os"

logutil "github.com/argoproj/argo-rollouts/utils/log"
log "github.com/sirupsen/logrus"
"k8s.io/cli-runtime/pkg/genericclioptions"
_ "k8s.io/client-go/plugin/pkg/client/auth/azure"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
_ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
"k8s.io/klog/v2"

logutil "github.com/argoproj/argo-rollouts/utils/log"

"github.com/argoproj/argo-rollouts/pkg/kubectl-argo-rollouts/cmd"
"github.com/argoproj/argo-rollouts/pkg/kubectl-argo-rollouts/options"
)
Expand Down
5 changes: 3 additions & 2 deletions cmd/rollouts-controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import (
"strings"
"time"

"github.com/argoproj/argo-rollouts/metricproviders"
"github.com/argoproj/argo-rollouts/utils/record"
"github.com/argoproj/pkg/kubeclientmetrics"
smiclientset "github.com/servicemeshinterface/smi-sdk-go/pkg/gen/client/split/clientset/versioned"
log "github.com/sirupsen/logrus"
Expand All @@ -23,6 +21,9 @@ import (
_ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
"k8s.io/client-go/tools/clientcmd"

"github.com/argoproj/argo-rollouts/metricproviders"
"github.com/argoproj/argo-rollouts/utils/record"

"github.com/argoproj/argo-rollouts/controller"
"github.com/argoproj/argo-rollouts/controller/metrics"
jobprovider "github.com/argoproj/argo-rollouts/metricproviders/job"
Expand Down
3 changes: 2 additions & 1 deletion controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ import (

istioutil "github.com/argoproj/argo-rollouts/utils/istio"

rolloutsConfig "github.com/argoproj/argo-rollouts/utils/config"
goPlugin "github.com/hashicorp/go-plugin"

rolloutsConfig "github.com/argoproj/argo-rollouts/utils/config"

"k8s.io/apimachinery/pkg/util/wait"

"k8s.io/client-go/dynamic/dynamicinformer"
Expand Down
3 changes: 2 additions & 1 deletion controller/metrics/experiment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/yaml"

"github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"

"github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion controller/metrics/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ import (
"testing"
"time"

"github.com/argoproj/argo-rollouts/utils/defaults"
"github.com/stretchr/testify/assert"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/tools/cache"

"github.com/argoproj/argo-rollouts/utils/defaults"

"github.com/argoproj/argo-rollouts/pkg/client/clientset/versioned/fake"
informerfactory "github.com/argoproj/argo-rollouts/pkg/client/informers/externalversions"
logutil "github.com/argoproj/argo-rollouts/utils/log"
Expand Down
3 changes: 2 additions & 1 deletion controller/metrics/prommetrics.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package metrics

import (
"github.com/argoproj/argo-rollouts/utils/version"
"github.com/prometheus/client_golang/prometheus"

"github.com/argoproj/argo-rollouts/utils/version"
)

// Follow Prometheus naming practices
Expand Down
5 changes: 3 additions & 2 deletions controller/metrics/rollout_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/yaml"

"github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1"
"github.com/argoproj/argo-rollouts/utils/conditions"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"

"github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1"
"github.com/argoproj/argo-rollouts/utils/conditions"
)

const (
Expand Down
5 changes: 3 additions & 2 deletions experiments/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ import (

"k8s.io/apimachinery/pkg/api/errors"

"github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1"
logutil "github.com/argoproj/argo-rollouts/utils/log"
log "github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"

"github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1"
logutil "github.com/argoproj/argo-rollouts/utils/log"
)

var experimentKind = v1alpha1.SchemeGroupVersion.WithKind("Experiment")
Expand Down
18 changes: 8 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/argoproj/argo-rollouts

go 1.21

toolchain go1.21.8
go 1.23.0

require (
github.com/antonmedv/expr v1.15.5
Expand Down Expand Up @@ -100,7 +98,7 @@ require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chai2010/gettext-go v1.0.2 // indirect
github.com/chainguard-dev/git-urls v1.0.2 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/cloudflare/circl v1.6.1 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
Expand Down Expand Up @@ -202,14 +200,14 @@ require (
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.19.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/crypto v0.36.0 // indirect
golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/term v0.27.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sync v0.12.0 // indirect
golang.org/x/sys v0.31.0 // indirect
golang.org/x/term v0.30.0 // indirect
golang.org/x/text v0.23.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
gomodules.xyz/envconfig v1.3.1-0.20190308184047-426f31af0d45 // indirect
Expand Down
Loading
Loading