Skip to content

Commit 2fe1b39

Browse files
authored
Merge pull request #1759 from jhutar/fix45-probes
feat(KONFLUX-11678): Update release lib and get us to Go 1.25
2 parents 0cff4b3 + a8e6f2d commit 2fe1b39

84 files changed

Lines changed: 4549 additions & 3329 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/PR.yaml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,28 @@ jobs:
66
name: lint
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v3
9+
- uses: actions/checkout@v6
1010
- name: Setup Golang
11-
uses: actions/setup-go@v4
11+
uses: actions/setup-go@v6
1212
with:
13-
go-version: '1.24'
13+
go-version: '1.25'
1414
- run: go version
1515
- name: golangci-lint
16-
uses: golangci/golangci-lint-action@v6
16+
uses: golangci/golangci-lint-action@v9
1717
with:
1818
args: --timeout=10m
19-
version: v1.64.5
19+
version: v2.8.0
2020
- name: Run Gosec Security Scanner
21-
uses: securego/gosec@v2.20.0
21+
uses: securego/gosec@v2.22.11
2222
with:
2323
# we let the report trigger content trigger a failure using the GitHub Security features.
2424
args: "-no-fail -fmt sarif -out results.sarif ./..."
25+
- name: Cleanup results.sarif file
26+
# This is workaround for https://github.com/securego/gosec/issues/1482
27+
run: |
28+
jq '(.runs[].results[].fixes[]? | select(.artifactChanges == null)).artifactChanges = [{"artifactLocation": {"uri": "unknown"}, "replacements": [{"deletedRegion": {"startLine": 1}}]}]' results.sarif > results.sarif.tmp && mv results.sarif.tmp results.sarif
2529
- name: Upload SARIF file
26-
uses: github/codeql-action/upload-sarif@v3
30+
uses: github/codeql-action/upload-sarif@v4
2731
with:
2832
# Path to SARIF file relative to the root of the repository
2933
sarif_file: results.sarif
@@ -32,8 +36,10 @@ jobs:
3236
name: Unit tests
3337
runs-on: ubuntu-latest
3438
steps:
35-
- uses: actions/checkout@v3
39+
- uses: actions/checkout@v6
3640
- name: Setup Golang
37-
uses: actions/setup-go@v3
41+
uses: actions/setup-go@v6
42+
with:
43+
go-version: '1.25'
3844
- name: Run unit tests
3945
run: make test/unit

.golangci.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
1-
issues:
2-
exclude:
3-
- composites
1+
version: "2"
42
linters:
53
enable:
64
- ginkgolinter
5+
exclusions:
6+
generated: lax
7+
presets:
8+
- comments
9+
- common-false-positives
10+
- legacy
11+
- std-error-handling
12+
rules:
13+
- path: (.+)\.go$
14+
text: composites
15+
paths:
16+
- third_party$
17+
- builtin$
18+
- examples$
19+
formatters:
20+
exclusions:
21+
generated: lax
22+
paths:
23+
- third_party$
24+
- builtin$
25+
- examples$

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM registry.access.redhat.com/ubi9/go-toolset:1.24 AS builder
1+
FROM registry.access.redhat.com/ubi9/go-toolset:1.25 AS builder
22
ENV GOBIN=$HOME/bin
33

44
USER root
@@ -83,7 +83,7 @@ RUN ARCH=${TARGETARCH} && \
8383
rm -rf oras_${ORAS_VERSION}_*.tar.gz oras-install/ && \
8484
oras version
8585

86-
FROM registry.access.redhat.com/ubi9/go-toolset:1.24
86+
FROM registry.access.redhat.com/ubi9/go-toolset:1.25
8787
USER root
8888

8989
WORKDIR /konflux-e2e

go.mod

Lines changed: 201 additions & 182 deletions
Large diffs are not rendered by default.

go.sum

Lines changed: 1547 additions & 411 deletions
Large diffs are not rendered by default.

magefiles/installation/install.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ func (i *InstallAppStudio) CheckOperatorsReady() (err error) {
249249
klog.Fatal(err)
250250
}
251251

252-
if !(application.Status.Sync.Status == "Synced" && application.Status.Health.Status == "Healthy") {
252+
if application.Status.Sync.Status != "Synced" || application.Status.Health.Status != "Healthy" {
253253
klog.Infof("Application %s not ready", app.Name)
254254
count++
255255
} else if strings.Contains(application.String(), ("context deadline exceeded")) {

magefiles/rulesengine/repos/common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func ExecuteTestAction(rctx *rulesengine.RuleCtx) error {
4848
if err != nil {
4949
return fmt.Errorf("can't convert %q to an int to configure the amount of ginkgo procs", procs)
5050
}
51-
rctx.CLIConfig.Procs = procsInt
51+
rctx.Procs = procsInt
5252
rctx.NoColor = true
5353
}
5454

magefiles/rulesengine/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ func NewRuleCtx() *RuleCtx {
459459
var reporterConfig = types.NewDefaultReporterConfig()
460460
var cliConfig = types.NewDefaultCLIConfig()
461461
var goFlagsConfig = types.NewDefaultGoFlagsConfig()
462-
var envData map[string]any = make(map[string]any)
462+
envData := make(map[string]any)
463463

464464
r := &RuleCtx{cliConfig,
465465
suiteConfig,

pkg/clients/common/pod.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
"github.com/konflux-ci/e2e-tests/pkg/logs"
99
"github.com/konflux-ci/e2e-tests/pkg/utils"
10-
. "github.com/onsi/ginkgo/v2"
10+
ginkgo "github.com/onsi/ginkgo/v2"
1111
corev1 "k8s.io/api/core/v1"
1212
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1313
"k8s.io/apimachinery/pkg/labels"
@@ -104,7 +104,7 @@ func (s *SuiteController) GetPodLogs(pod *corev1.Pod) map[string][]byte {
104104
for _, c := range containers {
105105
log, err := utils.GetContainerLogs(s.KubeInterface(), pod.Name, c.Name, pod.Namespace)
106106
if err != nil {
107-
GinkgoWriter.Printf("error getting logs for pod/container %s/%s: %v\n", pod.Name, c.Name, err.Error())
107+
ginkgo.GinkgoWriter.Printf("error getting logs for pod/container %s/%s: %v\n", pod.Name, c.Name, err.Error())
108108
continue
109109
}
110110

pkg/clients/common/secret.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"time"
99

1010
"github.com/konflux-ci/e2e-tests/pkg/constants"
11-
. "github.com/konflux-ci/e2e-tests/pkg/constants"
1211
"github.com/konflux-ci/e2e-tests/pkg/utils"
1312
corev1 "k8s.io/api/core/v1"
1413
k8sErrors "k8s.io/apimachinery/pkg/api/errors"
@@ -163,12 +162,12 @@ func (s *SuiteController) AddRegistryAuthSecretToSA(registryAuth, namespace stri
163162
return fmt.Errorf("%s", "failed to get registry auth secret")
164163
}
165164

166-
_, err := s.CreateRegistryAuthSecret(RegistryAuthSecretName, namespace, quayToken)
165+
_, err := s.CreateRegistryAuthSecret(constants.RegistryAuthSecretName, namespace, quayToken)
167166
if err != nil {
168167
return err
169168
}
170169

171-
err = s.LinkSecretToServiceAccount(namespace, RegistryAuthSecretName, DefaultPipelineServiceAccount, true)
170+
err = s.LinkSecretToServiceAccount(namespace, constants.RegistryAuthSecretName, constants.DefaultPipelineServiceAccount, true)
172171
if err != nil {
173172
return err
174173
}

0 commit comments

Comments
 (0)