Skip to content
Open
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/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- 'feat/*'

env:
GO_VERSION: 1.25.0
GO_VERSION: 1.26.2
NODE_VERSION: 20.19.0
HELM_VERSION: 3.8.2

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

env:
GO_VERSION: 1.25.0
GO_VERSION: 1.26.2
NODE_VERSION: 20.19.0
GOLANGCI_LINT_VERSION: v2.4.0
GOLANGCI_LINT_VERSION: v2.11.4
HELM_VERSION: 3.17.3

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_binary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'v*'

env:
GO_VERSION: 1.25.0
GO_VERSION: 1.26.2

jobs:
gh_release:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_pipedv1_exp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
permissions: {}

env:
GO_VERSION: 1.25.0
GO_VERSION: 1.26.2
GHCR: ghcr.io
GCR: gcr.io
HELM_VERSION: 3.8.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
GO_VERSION: 1.25.0
GO_VERSION: 1.26.2
NODE_VERSION: 20.19.0

jobs:
Expand Down
2 changes: 1 addition & 1 deletion cmd/helloworld/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM golang:1.25.0 AS builder
FROM --platform=$BUILDPLATFORM golang:1.26.2 AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion cmd/launcher/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM golang:1.25.0 AS builder
FROM --platform=$BUILDPLATFORM golang:1.26.2 AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion cmd/launcher/Dockerfile-okd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM golang:1.25.0 AS builder
FROM --platform=$BUILDPLATFORM golang:1.26.2 AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion cmd/pipecd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN make update/web-deps
RUN make build/web

# pipecd builder
FROM --platform=$BUILDPLATFORM golang:1.25.0 AS builder
FROM --platform=$BUILDPLATFORM golang:1.26.2 AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion cmd/pipecd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## Prerequisites

- [Go 1.24 or later](https://go.dev/)
- [Go 1.26 or later](https://go.dev/)
- [NodeJS v20.19.0 or later](https://nodejs.org/en/)
- [Docker](https://www.docker.com/)
- [kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installation) (If you want to run Control Plane locally)
Expand Down
2 changes: 1 addition & 1 deletion cmd/pipectl/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM golang:1.25.0 AS builder
FROM --platform=$BUILDPLATFORM golang:1.26.2 AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion cmd/piped/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM golang:1.25.0 AS builder
FROM --platform=$BUILDPLATFORM golang:1.26.2 AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion cmd/piped/Dockerfile-okd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM golang:1.25.0 AS builder
FROM --platform=$BUILDPLATFORM golang:1.26.2 AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion cmd/piped/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## Prerequisites

- [Go 1.24 or later](https://go.dev/)
- [Go 1.26 or later](https://go.dev/)

## Repositories
- [pipecd](https://github.com/pipe-cd/pipecd): contains all source code and documentation of PipeCD project.
Expand Down
2 changes: 1 addition & 1 deletion cmd/pipedv1/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM golang:1.25.0 AS builder
FROM --platform=$BUILDPLATFORM golang:1.26.2 AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion cmd/pipedv1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ See [Overview of the Plan for Pluginnable PipeCD](https://pipecd.dev/blog/2024/1

## Prerequisites

- [Go 1.24 or later](https://go.dev/)
- [Go 1.26 or later](https://go.dev/)

## Repositories
- [pipecd](https://github.com/pipe-cd/pipecd): contains all source code and documentation of PipeCD project.
Expand Down
2 changes: 1 addition & 1 deletion docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.25.0-alpine3.22 AS builder
FROM golang:1.26.2-alpine3.22 AS builder
COPY main.go .
RUN go build -o /server main.go

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/pipe-cd/pipecd

go 1.25.0
go 1.26.2

require (
cloud.google.com/go/firestore v1.14.0
Expand Down
5 changes: 3 additions & 2 deletions pkg/app/ops/firestoreindexensurer/gcloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,13 @@ func (c *gcloud) createIndex(ctx context.Context, idx *index) error {
// For that, seems like additional permission is required. We have to look out for.

// Run gcloud command in async mode, which returns immediately without waiting for the operation in progress to complete.
args := []string{
args := make([]string, 0, 9+2*len(idx.Fields))
args = append(args,
"firestore", "indexes", "composite", "create",
"--async",
"--project", c.projectID,
"--collection-group", idx.CollectionGroup,
}
)
for _, f := range idx.Fields {
fieldCfg := fmt.Sprintf("field-path=%s", f.FieldPath)
if f.Order != "" {
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/controller/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ func (s *scheduler) executeStage(sig executor.StopSignal, ps model.PipelineStage
// Skip the stage if needed based on the skip config.
skip, err := s.shouldSkipStage(sig.Context(), input)
if err != nil {
lp.Errorf("failed to check whether skipping the stage: %w", err.Error())
lp.Errorf("failed to check whether skipping the stage: %s", err.Error())
if err := s.reportStageStatus(ctx, ps.Id, model.StageStatus_STAGE_FAILURE, ps.Requires); err != nil {
s.logger.Error("failed to report stage status", zap.Error(err))
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/driftdetector/cloudrun/detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ func makeSyncState(r *provider.DiffResult, commit string) model.ApplicationSyncS
}

var b strings.Builder
b.WriteString(fmt.Sprintf("Diff between the defined state in Git at commit %s and actual live state:\n\n", commit))
fmt.Fprintf(&b, "Diff between the defined state in Git at commit %s and actual live state:\n\n", commit)
b.WriteString("--- Actual (LiveState)\n+++ Expected (Git)\n\n")

details := r.Render(provider.DiffRenderOptions{
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/driftdetector/kubernetes/detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ func makeSyncState(r *provider.DiffListResult, commit string) model.ApplicationS
}

var b strings.Builder
b.WriteString(fmt.Sprintf("Diff between the defined state in Git at commit %s and actual state in cluster:\n\n", commit))
fmt.Fprintf(&b, "Diff between the defined state in Git at commit %s and actual state in cluster:\n\n", commit)
b.WriteString("--- Actual (LiveState)\n+++ Expected (Git)\n\n")

details := r.Render(provider.DiffRenderOptions{
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/driftdetector/terraform/detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ func makeSyncState(r provider.PlanResult, commit string) (*model.ApplicationSync
}

var b strings.Builder
b.WriteString(fmt.Sprintf("Diff between the defined state in Git at commit %s and actual live state:\n\n", commit))
fmt.Fprintf(&b, "Diff between the defined state in Git at commit %s and actual live state:\n\n", commit)
b.WriteString("--- Actual (LiveState)\n+++ Expected (Git)\n\n")

details, err := r.Render()
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/platformprovider/lambda/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (c *client) CreateFunction(ctx context.Context, fm FunctionManifest) error
Layers: fm.Spec.Layers,
}
if len(fm.Spec.Architectures) != 0 {
var architectures []types.Architecture
architectures := make([]types.Architecture, 0, len(fm.Spec.Architectures))
for _, arch := range fm.Spec.Architectures {
architectures = append(architectures, types.Architecture(arch.Name))
}
Expand Down
28 changes: 12 additions & 16 deletions pkg/app/piped/platformprovider/terraform/terraform.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ func (t *Terraform) Version(ctx context.Context) (string, error) {
}

func (t *Terraform) Init(ctx context.Context, w io.Writer) error {
args := []string{
"init",
}
args = append(args, t.makeCommonCommandArgs()...)
commonArgs := t.makeCommonCommandArgs()
args := make([]string, 0, 1+len(commonArgs)+len(t.options.initFlags))
args = append(args, "init")
args = append(args, commonArgs...)
args = append(args, t.options.initFlags...)

cmd := exec.CommandContext(ctx, t.execPath, args...)
Expand Down Expand Up @@ -274,12 +274,10 @@ func GetExitCode(err error) int {
}

func (t *Terraform) Plan(ctx context.Context, w io.Writer) (PlanResult, error) {
args := []string{
"plan",
"-lock=false",
"-detailed-exitcode",
}
args = append(args, t.makeCommonCommandArgs()...)
commonArgs := t.makeCommonCommandArgs()
args := make([]string, 0, 3+len(commonArgs)+len(t.options.planFlags))
args = append(args, "plan", "-lock=false", "-detailed-exitcode")
args = append(args, commonArgs...)
args = append(args, t.options.planFlags...)

var buf bytes.Buffer
Expand Down Expand Up @@ -390,12 +388,10 @@ func parsePlanResult(out string, ansiIncluded bool) (PlanResult, error) {
}

func (t *Terraform) Apply(ctx context.Context, w io.Writer) error {
args := []string{
"apply",
"-auto-approve",
"-input=false",
}
args = append(args, t.makeCommonCommandArgs()...)
commonArgs := t.makeCommonCommandArgs()
args := make([]string, 0, 3+len(commonArgs)+len(t.options.applyFlags))
args = append(args, "apply", "-auto-approve", "-input=false")
args = append(args, commonArgs...)
args = append(args, t.options.applyFlags...)

cmd := exec.CommandContext(ctx, t.execPath, args...)
Expand Down
4 changes: 2 additions & 2 deletions pkg/app/piped/trigger/trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ func (t *Trigger) listCommandCandidates() []candidate {
func (t *Trigger) listOutOfSyncCandidates() []candidate {
var (
list = t.applicationLister.List()
apps = make([]candidate, 0)
apps = make([]candidate, 0, len(list))
)
for _, app := range list {
if !app.IsOutOfSync() {
Expand All @@ -432,7 +432,7 @@ func (t *Trigger) listOutOfSyncCandidates() []candidate {
func (t *Trigger) listCommitCandidates() []candidate {
var (
list = t.applicationLister.List()
apps = make([]candidate, 0)
apps = make([]candidate, 0, len(list))
)
for _, app := range list {
apps = append(apps, candidate{
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/pipedv1/plugin/analysis/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/analysis

go 1.25.0
go 1.26.2

require (
github.com/DataDog/datadog-api-client-go v1.0.0-beta.16
Expand Down
4 changes: 1 addition & 3 deletions pkg/app/pipedv1/plugin/cloudrun/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/cloudrunservice

go 1.24.1

toolchain go1.24.2
go 1.26.2

require (
github.com/creasty/defaults v1.6.0
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/pipedv1/plugin/ecs/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/ecs

go 1.25.0
go 1.26.2

require (
github.com/aws/aws-sdk-go-v2 v1.31.0
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/pipedv1/plugin/kubernetes/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes

go 1.25.0
go 1.26.2

require (
github.com/creasty/defaults v1.6.0
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/pipedv1/plugin/kubernetes/livestate/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func calculateSyncState(diffResult *provider.DiffListResult, commit string) sdk.
}

var b strings.Builder
b.WriteString(fmt.Sprintf("Diff between the defined state in Git at commit %s and actual state in cluster:\n\n", commit))
fmt.Fprintf(&b, "Diff between the defined state in Git at commit %s and actual state in cluster:\n\n", commit)
b.WriteString("--- Actual (LiveState)\n+++ Expected (Git)\n\n")

details := diffResult.Render(provider.DiffRenderOptions{
Expand Down
4 changes: 2 additions & 2 deletions pkg/app/pipedv1/plugin/kubernetes/provider/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,11 @@ func (r *DiffListResult) Render(opt DiffRenderOptions) string {
index := 0
for _, delete := range r.Deletes {
index++
b.WriteString(fmt.Sprintf("- %d. %s\n\n", index, delete.Key().ReadableString()))
fmt.Fprintf(&b, "- %d. %s\n\n", index, delete.Key().ReadableString())
}
for _, add := range r.Adds {
index++
b.WriteString(fmt.Sprintf("+ %d. %s\n\n", index, add.Key().ReadableString()))
fmt.Fprintf(&b, "+ %d. %s\n\n", index, add.Key().ReadableString())
}

maxPrintDiffs := len(r.Changes)
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/pipedv1/plugin/kubernetes_multicluster/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/kubernetes_multicluster

go 1.25.0
go 1.26.2

require (
github.com/creasty/defaults v1.6.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func calculateSyncState(diffResult *provider.DiffListResult, commit string, dt *
}

var b strings.Builder
b.WriteString(fmt.Sprintf("Diff between the defined state in Git at commit %s and actual state in cluster: %s\n\n", commit, dt.Name))
fmt.Fprintf(&b, "Diff between the defined state in Git at commit %s and actual state in cluster: %s\n\n", commit, dt.Name)
b.WriteString("--- Actual (LiveState)\n+++ Expected (Git)\n\n")

details := diffResult.Render(provider.DiffRenderOptions{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,11 @@ func (r *DiffListResult) Render(opt DiffRenderOptions) string {
index := 0
for _, delete := range r.Deletes {
index++
b.WriteString(fmt.Sprintf("- %d. %s\n\n", index, delete.Key().ReadableString()))
fmt.Fprintf(&b, "- %d. %s\n\n", index, delete.Key().ReadableString())
}
for _, add := range r.Adds {
index++
b.WriteString(fmt.Sprintf("+ %d. %s\n\n", index, add.Key().ReadableString()))
fmt.Fprintf(&b, "+ %d. %s\n\n", index, add.Key().ReadableString())
}

maxPrintDiffs := len(r.Changes)
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/pipedv1/plugin/scriptrun/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/scriptrun

go 1.25.0
go 1.26.2

require (
github.com/creasty/defaults v1.6.0
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/pipedv1/plugin/terraform/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/pipe-cd/pipecd/pkg/app/pipedv1/plugin/terraform

go 1.25.0
go 1.26.2

require (
github.com/creasty/defaults v1.6.0
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/pipedv1/plugin/terraform/livestate/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func makeSyncState(r provider.PlanResult, commit string) (sdk.ApplicationSyncSta
}

var b strings.Builder
b.WriteString(fmt.Sprintf("Diff between the defined state in Git at commit %s and actual live state:\n\n", commit))
fmt.Fprintf(&b, "Diff between the defined state in Git at commit %s and actual live state:\n\n", commit)
b.WriteString("--- Actual (LiveState)\n+++ Expected (Git)\n\n")

details, err := r.Render()
Expand Down
Loading
Loading