From 609f960bb5db552c443558be7883be78d75f4085 Mon Sep 17 00:00:00 2001 From: David May <49894298+wass3rw3rk@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:17:01 -0500 Subject: [PATCH 1/3] fix(templates): prevent nil panic (#1194) --- compiler/native/compile_test.go | 118 ++++++++++++++++++ compiler/native/parse.go | 15 +++ compiler/native/parse_test.go | 15 +++ .../testdata/golang_inline_stages_env.yml | 19 +++ .../testdata/inline_with_stages_env.yml | 27 ++++ 5 files changed, 194 insertions(+) create mode 100644 compiler/native/testdata/golang_inline_stages_env.yml create mode 100644 compiler/native/testdata/inline_with_stages_env.yml diff --git a/compiler/native/compile_test.go b/compiler/native/compile_test.go index 275ab925c..29a37c8d3 100644 --- a/compiler/native/compile_test.go +++ b/compiler/native/compile_test.go @@ -3292,6 +3292,123 @@ func Test_CompileLite(t *testing.T) { }, wantErr: false, }, + { + name: "render_inline with stages and env in template", + args: args{ + file: "testdata/inline_with_stages_env.yml", + pipelineType: "", + substitute: true, + }, + want: &yaml.Build{ + Version: "1", + Metadata: yaml.Metadata{ + RenderInline: true, + Environment: []string{"steps", "services", "secrets"}, + }, + Templates: []*yaml.Template{ + { + Name: "golang", + Source: "github.example.com/github/octocat/golang_inline_stages_env.yml", + Format: "golang", + Type: "github", + Variables: map[string]any{ + "image": string("golang:latest"), + "VELA_TEMPLATE_NAME": string("golang"), + }, + }, + }, + Environment: raw.StringSliceMap{"DONT": "break"}, + Stages: []*yaml.Stage{ + { + Name: "test", + Needs: []string{"clone"}, + Steps: []*yaml.Step{ + { + Commands: raw.StringSlice{"echo from inline"}, + Image: "alpine", + Name: "test", + Pull: "not_present", + }, + { + Commands: raw.StringSlice{"echo from inline ruleset"}, + Image: "alpine", + Name: "ruleset", + Pull: "not_present", + Ruleset: yaml.Ruleset{ + If: yaml.Rules{ + Event: []string{"push"}, + Branch: []string{"main"}, + }, + Matcher: "filepath", + Operator: "and", + }, + }, + }, + }, + { + Name: "golang_foo", + Needs: []string{"clone"}, + Steps: []*yaml.Step{ + { + Commands: raw.StringSlice{"echo hello from foo"}, + Image: "golang:latest", + Name: "golang_foo", + Pull: "not_present", + Ruleset: yaml.Ruleset{ + If: yaml.Rules{ + Event: []string{"tag"}, + Tag: []string{"v*"}, + }, + Matcher: "filepath", + Operator: "and", + }, + }, + }, + }, + { + Name: "golang_bar", + Needs: []string{"clone"}, + Steps: []*yaml.Step{ + { + Commands: raw.StringSlice{"echo hello from bar"}, + Image: "golang:latest", + Name: "golang_bar", + Pull: "not_present", + Ruleset: yaml.Ruleset{ + If: yaml.Rules{ + Event: []string{"tag"}, + Tag: []string{"v*"}, + }, + Matcher: "filepath", + Operator: "and", + }, + }, + }, + }, + { + Name: "golang_star", + Needs: []string{"clone"}, + Steps: []*yaml.Step{ + { + Commands: raw.StringSlice{"echo hello from star"}, + Image: "golang:latest", + Name: "golang_star", + Pull: "not_present", + Ruleset: yaml.Ruleset{ + If: yaml.Rules{ + Event: []string{"tag"}, + Tag: []string{"v*"}, + }, + Matcher: "filepath", + Operator: "and", + }, + }, + }, + }, + }, + }, + wantErr: false, + }, { name: "render_inline with stages - ruleset", args: args{ @@ -3827,6 +3944,7 @@ func Test_CompileLite(t *testing.T) { Metadata: yaml.Metadata{ Environment: []string{"steps", "services", "secrets"}, }, + Environment: raw.StringSliceMap{}, Stages: []*yaml.Stage{ { Name: "foo", diff --git a/compiler/native/parse.go b/compiler/native/parse.go index a09f6964e..6da637188 100644 --- a/compiler/native/parse.go +++ b/compiler/native/parse.go @@ -12,6 +12,7 @@ import ( "github.com/go-vela/server/compiler/template/native" "github.com/go-vela/server/compiler/template/starlark" "github.com/go-vela/types/constants" + typesRaw "github.com/go-vela/types/raw" types "github.com/go-vela/types/yaml" ) @@ -100,6 +101,13 @@ func (c *client) Parse(v interface{}, pipelineType string, template *types.Templ return nil, nil, fmt.Errorf("unable to parse config: unrecognized pipeline_type of %s", c.repo.GetPipelineType()) } + // initializing Environment to prevent nil error + // as it may be modified later via templates, if + // none are defined in the base pipeline + if p.Environment == nil { + p.Environment = typesRaw.StringSliceMap{} + } + return p, raw, nil } @@ -113,6 +121,13 @@ func ParseBytes(data []byte) (*types.Build, []byte, error) { return nil, data, fmt.Errorf("unable to unmarshal yaml: %w", err) } + // initializing Environment to prevent nil error + // as it may be modified later via templates, if + // none are defined in the base pipeline + if config.Environment == nil { + config.Environment = typesRaw.StringSliceMap{} + } + return config, data, nil } diff --git a/compiler/native/parse_test.go b/compiler/native/parse_test.go index 74da7baa9..a47da0459 100644 --- a/compiler/native/parse_test.go +++ b/compiler/native/parse_test.go @@ -29,6 +29,7 @@ func TestNative_Parse_Metadata_Bytes(t *testing.T) { Clone: nil, Environment: []string{"steps", "services", "secrets"}, }, + Environment: raw.StringSliceMap{}, } // run test @@ -57,6 +58,7 @@ func TestNative_Parse_Metadata_File(t *testing.T) { Clone: nil, Environment: []string{"steps", "services", "secrets"}, }, + Environment: raw.StringSliceMap{}, } // run test @@ -103,6 +105,7 @@ func TestNative_Parse_Metadata_Path(t *testing.T) { Clone: nil, Environment: []string{"steps", "services", "secrets"}, }, + Environment: raw.StringSliceMap{}, } // run test @@ -126,6 +129,7 @@ func TestNative_Parse_Metadata_Reader(t *testing.T) { Clone: nil, Environment: []string{"steps", "services", "secrets"}, }, + Environment: raw.StringSliceMap{}, } // run test @@ -154,6 +158,7 @@ func TestNative_Parse_Metadata_String(t *testing.T) { Clone: nil, Environment: []string{"steps", "services", "secrets"}, }, + Environment: raw.StringSliceMap{}, } // run test @@ -179,6 +184,7 @@ func TestNative_Parse_Parameters(t *testing.T) { Metadata: yaml.Metadata{ Environment: []string{"steps", "services", "secrets"}, }, + Environment: raw.StringSliceMap{}, Steps: yaml.StepSlice{ &yaml.Step{ Image: "plugins/docker:18.09", @@ -457,6 +463,7 @@ func TestNative_Parse_Secrets(t *testing.T) { Metadata: yaml.Metadata{ Environment: []string{"steps", "services", "secrets"}, }, + Environment: raw.StringSliceMap{}, Secrets: yaml.SecretSlice{ &yaml.Secret{ Name: "docker_username", @@ -527,6 +534,7 @@ func TestNative_Parse_Stages(t *testing.T) { Metadata: yaml.Metadata{ Environment: []string{"steps", "services", "secrets"}, }, + Environment: raw.StringSliceMap{}, Stages: yaml.StageSlice{ &yaml.Stage{ Name: "install", @@ -603,6 +611,7 @@ func TestNative_Parse_Steps(t *testing.T) { Metadata: yaml.Metadata{ Environment: []string{"steps", "services", "secrets"}, }, + Environment: raw.StringSliceMap{}, Steps: yaml.StepSlice{ &yaml.Step{ Commands: []string{"./gradlew downloadDependencies"}, @@ -663,6 +672,7 @@ func TestNative_ParseBytes_Metadata(t *testing.T) { Clone: nil, Environment: []string{"steps", "services", "secrets"}, }, + Environment: raw.StringSliceMap{}, } // run test @@ -709,6 +719,7 @@ func TestNative_ParseFile_Metadata(t *testing.T) { Clone: nil, Environment: []string{"steps", "services", "secrets"}, }, + Environment: raw.StringSliceMap{}, } // run test @@ -759,6 +770,7 @@ func TestNative_ParsePath_Metadata(t *testing.T) { Clone: nil, Environment: []string{"steps", "services", "secrets"}, }, + Environment: raw.StringSliceMap{}, } // run test @@ -795,6 +807,7 @@ func TestNative_ParseReader_Metadata(t *testing.T) { Clone: nil, Environment: []string{"steps", "services", "secrets"}, }, + Environment: raw.StringSliceMap{}, } // run test @@ -836,6 +849,7 @@ func TestNative_ParseString_Metadata(t *testing.T) { Clone: nil, Environment: []string{"steps", "services", "secrets"}, }, + Environment: raw.StringSliceMap{}, } // run test @@ -870,6 +884,7 @@ func Test_client_Parse(t *testing.T) { Clone: nil, Environment: []string{"steps", "services", "secrets"}, }, + Environment: raw.StringSliceMap{}, Steps: yaml.StepSlice{ { Name: "foo", diff --git a/compiler/native/testdata/golang_inline_stages_env.yml b/compiler/native/testdata/golang_inline_stages_env.yml new file mode 100644 index 000000000..32be4a52f --- /dev/null +++ b/compiler/native/testdata/golang_inline_stages_env.yml @@ -0,0 +1,19 @@ +version: "1" + +environment: + DONT: break + +{{$stageList := list "foo" "bar" "star" -}} + +stages: + {{range $stage := $stageList -}} + {{ $stage }}: + steps: + - name: {{ $stage }} + image: {{ default "alpine" $.image }} + ruleset: + event: tag + tag: v* + commands: + - echo hello from {{ $stage }} + {{ end }} \ No newline at end of file diff --git a/compiler/native/testdata/inline_with_stages_env.yml b/compiler/native/testdata/inline_with_stages_env.yml new file mode 100644 index 000000000..93f5ff58a --- /dev/null +++ b/compiler/native/testdata/inline_with_stages_env.yml @@ -0,0 +1,27 @@ +version: "1" + +metadata: + render_inline: true + +templates: + - name: golang + source: github.example.com/github/octocat/golang_inline_stages_env.yml + format: golang + type: github + vars: + image: golang:latest + +stages: + test: + steps: + - name: test + image: alpine + commands: + - echo from inline + - name: ruleset + image: alpine + ruleset: + event: push + branch: main + commands: + - echo from inline ruleset \ No newline at end of file From b6d71a8d52b9739cf4d1fa1a5a405946d64e0efe Mon Sep 17 00:00:00 2001 From: David May <49894298+wass3rw3rk@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:59:32 -0500 Subject: [PATCH 2/3] revert: yaml parser switch (#1195) --- api/types/string.go | 2 +- compiler/native/compile.go | 2 +- compiler/native/compile_test.go | 6 +++--- compiler/native/expand_test.go | 4 ++-- compiler/native/parse.go | 2 +- compiler/native/substitute.go | 2 +- compiler/template/native/convert.go | 2 +- compiler/template/native/render.go | 2 +- compiler/template/native/render_test.go | 2 +- compiler/template/starlark/render.go | 2 +- compiler/template/starlark/render_test.go | 2 +- go.mod | 7 ++++--- go.sum | 10 ++++++---- mock/server/pipeline.go | 2 +- 14 files changed, 25 insertions(+), 22 deletions(-) diff --git a/api/types/string.go b/api/types/string.go index a7637d714..33ddacb59 100644 --- a/api/types/string.go +++ b/api/types/string.go @@ -7,8 +7,8 @@ import ( "strconv" "strings" + "github.com/buildkite/yaml" json "github.com/ghodss/yaml" - "gopkg.in/yaml.v3" ) // ToString is a helper function to convert diff --git a/compiler/native/compile.go b/compiler/native/compile.go index 1b630c2e0..a1f259400 100644 --- a/compiler/native/compile.go +++ b/compiler/native/compile.go @@ -12,9 +12,9 @@ import ( "strings" "time" + yml "github.com/buildkite/yaml" "github.com/hashicorp/go-cleanhttp" "github.com/hashicorp/go-retryablehttp" - yml "gopkg.in/yaml.v3" api "github.com/go-vela/server/api/types" "github.com/go-vela/server/internal" diff --git a/compiler/native/compile_test.go b/compiler/native/compile_test.go index 29a37c8d3..3670cae07 100644 --- a/compiler/native/compile_test.go +++ b/compiler/native/compile_test.go @@ -13,11 +13,11 @@ import ( "testing" "time" + yml "github.com/buildkite/yaml" "github.com/gin-gonic/gin" "github.com/google/go-cmp/cmp" "github.com/google/go-github/v65/github" "github.com/urfave/cli/v2" - yml "gopkg.in/yaml.v3" api "github.com/go-vela/server/api/types" "github.com/go-vela/server/internal" @@ -2056,7 +2056,7 @@ func Test_client_modifyConfig(t *testing.T) { Name: "docker", Pull: "always", Parameters: map[string]interface{}{ - "init_options": map[string]interface{}{ + "init_options": map[interface{}]interface{}{ "get_plugins": "true", }, }, @@ -2089,7 +2089,7 @@ func Test_client_modifyConfig(t *testing.T) { Name: "docker", Pull: "always", Parameters: map[string]interface{}{ - "init_options": map[string]interface{}{ + "init_options": map[interface{}]interface{}{ "get_plugins": "true", }, }, diff --git a/compiler/native/expand_test.go b/compiler/native/expand_test.go index 6e4c877d4..08ae0a165 100644 --- a/compiler/native/expand_test.go +++ b/compiler/native/expand_test.go @@ -589,7 +589,7 @@ func TestNative_ExpandStepsMulti(t *testing.T) { "auth_method": "token", "username": "octocat", "items": []interface{}{ - map[string]interface{}{"path": "docker", "source": "secret/docker"}, + map[interface{}]interface{}{"path": "docker", "source": "secret/docker"}, }, }, }, @@ -610,7 +610,7 @@ func TestNative_ExpandStepsMulti(t *testing.T) { "auth_method": "token", "username": "octocat", "items": []interface{}{ - map[string]interface{}{"path": "docker", "source": "secret/docker"}, + map[interface{}]interface{}{"path": "docker", "source": "secret/docker"}, }, }, }, diff --git a/compiler/native/parse.go b/compiler/native/parse.go index 6da637188..fb96b5428 100644 --- a/compiler/native/parse.go +++ b/compiler/native/parse.go @@ -7,7 +7,7 @@ import ( "io" "os" - "gopkg.in/yaml.v3" + "github.com/buildkite/yaml" "github.com/go-vela/server/compiler/template/native" "github.com/go-vela/server/compiler/template/starlark" diff --git a/compiler/native/substitute.go b/compiler/native/substitute.go index 53e9973e9..9bbc717cd 100644 --- a/compiler/native/substitute.go +++ b/compiler/native/substitute.go @@ -6,8 +6,8 @@ import ( "fmt" "strings" + "github.com/buildkite/yaml" "github.com/drone/envsubst" - "gopkg.in/yaml.v3" types "github.com/go-vela/types/yaml" ) diff --git a/compiler/template/native/convert.go b/compiler/template/native/convert.go index d59aa100e..ee45ef809 100644 --- a/compiler/template/native/convert.go +++ b/compiler/template/native/convert.go @@ -5,7 +5,7 @@ package native import ( "strings" - "gopkg.in/yaml.v3" + "github.com/buildkite/yaml" "github.com/go-vela/types/raw" ) diff --git a/compiler/template/native/render.go b/compiler/template/native/render.go index 3de50bc4b..a31f642b6 100644 --- a/compiler/template/native/render.go +++ b/compiler/template/native/render.go @@ -8,7 +8,7 @@ import ( "text/template" "github.com/Masterminds/sprig/v3" - "gopkg.in/yaml.v3" + "github.com/buildkite/yaml" "github.com/go-vela/types/raw" types "github.com/go-vela/types/yaml" diff --git a/compiler/template/native/render_test.go b/compiler/template/native/render_test.go index 70653fde5..f4c92160d 100644 --- a/compiler/template/native/render_test.go +++ b/compiler/template/native/render_test.go @@ -6,8 +6,8 @@ import ( "os" "testing" + goyaml "github.com/buildkite/yaml" "github.com/google/go-cmp/cmp" - goyaml "gopkg.in/yaml.v3" "github.com/go-vela/types/raw" "github.com/go-vela/types/yaml" diff --git a/compiler/template/starlark/render.go b/compiler/template/starlark/render.go index b3e69f12f..93b37cd78 100644 --- a/compiler/template/starlark/render.go +++ b/compiler/template/starlark/render.go @@ -7,9 +7,9 @@ import ( "errors" "fmt" + yaml "github.com/buildkite/yaml" "go.starlark.net/starlark" "go.starlark.net/starlarkstruct" - yaml "gopkg.in/yaml.v3" "github.com/go-vela/types/raw" types "github.com/go-vela/types/yaml" diff --git a/compiler/template/starlark/render_test.go b/compiler/template/starlark/render_test.go index fa30377d0..a730f1088 100644 --- a/compiler/template/starlark/render_test.go +++ b/compiler/template/starlark/render_test.go @@ -6,8 +6,8 @@ import ( "os" "testing" + goyaml "github.com/buildkite/yaml" "github.com/google/go-cmp/cmp" - goyaml "gopkg.in/yaml.v3" "github.com/go-vela/types/raw" "github.com/go-vela/types/yaml" diff --git a/go.mod b/go.mod index 53fc2e4b1..f6a58457d 100644 --- a/go.mod +++ b/go.mod @@ -7,15 +7,16 @@ require ( github.com/DATA-DOG/go-sqlmock v1.5.2 github.com/Masterminds/semver/v3 v3.3.0 github.com/Masterminds/sprig/v3 v3.3.0 - github.com/adhocore/gronx v1.19.0 + github.com/adhocore/gronx v1.19.1 github.com/alicebob/miniredis/v2 v2.33.0 github.com/aws/aws-sdk-go v1.55.5 + github.com/buildkite/yaml v0.0.0-20181016232759-0caa5f0796e3 github.com/distribution/reference v0.6.0 github.com/drone/envsubst v1.0.3 github.com/ghodss/yaml v1.0.0 github.com/gin-gonic/gin v1.10.0 github.com/go-playground/assert/v2 v2.2.0 - github.com/go-vela/types v0.25.0-rc1 + github.com/go-vela/types v0.25.0-rc2 github.com/golang-jwt/jwt/v5 v5.2.1 github.com/google/go-cmp v0.6.0 github.com/google/go-github/v65 v65.0.0 @@ -49,7 +50,6 @@ require ( golang.org/x/oauth2 v0.23.0 golang.org/x/sync v0.8.0 golang.org/x/time v0.6.0 - gopkg.in/yaml.v3 v3.0.1 gorm.io/driver/postgres v1.5.9 gorm.io/driver/sqlite v1.5.6 gorm.io/gorm v1.25.12 @@ -149,6 +149,7 @@ require ( google.golang.org/grpc v1.66.1 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect ) diff --git a/go.sum b/go.sum index 4f741e0d4..03fa5e454 100644 --- a/go.sum +++ b/go.sum @@ -16,8 +16,8 @@ github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tN github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/adhocore/gronx v1.19.0 h1:GrEvNMPDwXND+YFadCyFVQPC+/xxoGJaQzu+duNf6aU= -github.com/adhocore/gronx v1.19.0/go.mod h1:7oUY1WAU8rEJWmAxXR2DN0JaO4gi9khSgKjiRypqteg= +github.com/adhocore/gronx v1.19.1 h1:S4c3uVp5jPjnk00De0lslyTenGJ4nA3Ydbkj1SbdPVc= +github.com/adhocore/gronx v1.19.1/go.mod h1:7oUY1WAU8rEJWmAxXR2DN0JaO4gi9khSgKjiRypqteg= github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk= github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= @@ -36,6 +36,8 @@ github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= +github.com/buildkite/yaml v0.0.0-20181016232759-0caa5f0796e3 h1:q+sMKdA6L8LyGVudTkpGoC73h6ak2iWSPFiFo/pFOU8= +github.com/buildkite/yaml v0.0.0-20181016232759-0caa5f0796e3/go.mod h1:5hCug3EZaHXU3FdCA3gJm0YTNi+V+ooA2qNTiVpky4A= github.com/bytedance/sonic v1.12.2 h1:oaMFuRTpMHYLpCntGca65YWt5ny+wAceDERTkT2L9lg= github.com/bytedance/sonic v1.12.2/go.mod h1:B8Gt/XvtZ3Fqj+iSKMypzymZxw/FVwgIGKzMzT9r/rk= github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= @@ -100,8 +102,8 @@ github.com/go-playground/validator/v10 v10.22.1 h1:40JcKH+bBNGFczGuoBYgX4I6m/i27 github.com/go-playground/validator/v10 v10.22.1/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/go-test/deep v1.0.2 h1:onZX1rnHT3Wv6cqNgYyFOOlgVKJrksuCMCRvJStbMYw= github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/go-vela/types v0.25.0-rc1 h1:5pCV4pVt1bm6YYUdkNglRDa3PcFX3qGtf5rrmkUvdOc= -github.com/go-vela/types v0.25.0-rc1/go.mod h1:fLv2pbzIy6puAV6Cgh5ixUcchTUHT4D3xX05zIhkA9I= +github.com/go-vela/types v0.25.0-rc2 h1:FFj9DgwmTWzU72PsJC41BUJOdi0UHOO2pCvoyIlLlmQ= +github.com/go-vela/types v0.25.0-rc2/go.mod h1:gyKVRQjNosAJy4AJ164CnEF6jIkwd1y6Cm5pZ6M20ZM= github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= diff --git a/mock/server/pipeline.go b/mock/server/pipeline.go index aaa06daf7..0d90cf45d 100644 --- a/mock/server/pipeline.go +++ b/mock/server/pipeline.go @@ -8,8 +8,8 @@ import ( "net/http" "strings" + yml "github.com/buildkite/yaml" "github.com/gin-gonic/gin" - yml "gopkg.in/yaml.v3" "github.com/go-vela/types" "github.com/go-vela/types/library" From b2bdf3a2d2048ee45ab23f5665e4f0ea48b9c974 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 15:03:10 -0500 Subject: [PATCH 3/3] chore(deps): update all non-major dependencies (#1190) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- .github/workflows/codeql-analysis.yml | 8 ++++---- .github/workflows/integration-test.yml | 4 ++-- .github/workflows/prerelease.yml | 2 +- .github/workflows/publish.yml | 2 +- .github/workflows/reviewdog.yml | 4 ++-- .github/workflows/spec.yml | 2 +- .github/workflows/test.yml | 2 +- .github/workflows/validate.yml | 2 +- go.mod | 6 +++--- go.sum | 12 ++++++------ 11 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 97ffb392e..da039a48e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: steps: - name: clone - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: install go uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 76b9b9036..dc3a466b3 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -35,7 +35,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: install go uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 @@ -47,7 +47,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8 + uses: github/codeql-action/init@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -58,7 +58,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8 + uses: github/codeql-action/autobuild@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -72,4 +72,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8 + uses: github/codeql-action/analyze@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9 diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 791581421..0f8a634ab 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -40,7 +40,7 @@ jobs: steps: - name: clone - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: install go uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 @@ -62,7 +62,7 @@ jobs: steps: - name: clone - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: install go uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 8dfda502a..138711fb5 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -14,7 +14,7 @@ jobs: steps: - name: clone - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 with: # ensures we fetch tag history for the repository fetch-depth: 0 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c1275620a..1ecd42cd6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,7 +13,7 @@ jobs: steps: - name: clone - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 with: # ensures we fetch tag history for the repository fetch-depth: 0 diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 252b90324..9350897f1 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -12,7 +12,7 @@ jobs: steps: - name: clone - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: install go uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 @@ -36,7 +36,7 @@ jobs: steps: - name: clone - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: install go uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 diff --git a/.github/workflows/spec.yml b/.github/workflows/spec.yml index 1dbe808bb..188f801a6 100644 --- a/.github/workflows/spec.yml +++ b/.github/workflows/spec.yml @@ -13,7 +13,7 @@ jobs: steps: - name: clone - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: install go uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 02b94e659..9a2777268 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: steps: - name: clone - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: install go uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 6f0b721b6..df28fd3b0 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -13,7 +13,7 @@ jobs: steps: - name: clone - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: install go uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 diff --git a/go.mod b/go.mod index f6a58457d..280089ca0 100644 --- a/go.mod +++ b/go.mod @@ -35,7 +35,7 @@ require ( github.com/redis/go-redis/v9 v9.6.1 github.com/sirupsen/logrus v1.9.3 github.com/spf13/afero v1.11.0 - github.com/uptrace/opentelemetry-go-extra/otelgorm v0.3.1 + github.com/uptrace/opentelemetry-go-extra/otelgorm v0.3.2 github.com/urfave/cli/v2 v2.27.4 go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.55.0 go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.55.0 @@ -45,7 +45,7 @@ require ( go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0 go.opentelemetry.io/otel/sdk v1.30.0 go.opentelemetry.io/otel/trace v1.30.0 - go.starlark.net v0.0.0-20240725214946-42030a7cedce + go.starlark.net v0.0.0-20240925182052-1207426daebd golang.org/x/crypto v0.27.0 golang.org/x/oauth2 v0.23.0 golang.org/x/sync v0.8.0 @@ -134,7 +134,7 @@ require ( github.com/spf13/cast v1.7.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.12 // indirect - github.com/uptrace/opentelemetry-go-extra/otelsql v0.3.1 // indirect + github.com/uptrace/opentelemetry-go-extra/otelsql v0.3.2 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect github.com/yuin/gopher-lua v1.1.1 // indirect diff --git a/go.sum b/go.sum index 03fa5e454..310681239 100644 --- a/go.sum +++ b/go.sum @@ -293,10 +293,10 @@ github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= -github.com/uptrace/opentelemetry-go-extra/otelgorm v0.3.1 h1:GFFXCsiOWqrAovcIzxqJOYBEy2A/0jd//JNz/jTy1CA= -github.com/uptrace/opentelemetry-go-extra/otelgorm v0.3.1/go.mod h1:ncqprpzpjuZHDkvsnl/baPLA0stLgZSLsYEvUhAVkbM= -github.com/uptrace/opentelemetry-go-extra/otelsql v0.3.1 h1:i4f4ey/v5x0zXurkqV/zbOZlMLu8WNIvpDn1tJzdutY= -github.com/uptrace/opentelemetry-go-extra/otelsql v0.3.1/go.mod h1:ZKgZNsGk5Y+uOxRHcYb4MKLVpmKYU4/u7BUtbStJm7w= +github.com/uptrace/opentelemetry-go-extra/otelgorm v0.3.2 h1:Jjn3zoRz13f8b1bR6LrXWglx93Sbh4kYfwgmPju3E2k= +github.com/uptrace/opentelemetry-go-extra/otelgorm v0.3.2/go.mod h1:wocb5pNrj/sjhWB9J5jctnC0K2eisSdz/nJJBNFHo+A= +github.com/uptrace/opentelemetry-go-extra/otelsql v0.3.2 h1:ZjUj9BLYf9PEqBn8W/OapxhPjVRdC6CsXTdULHsyk5c= +github.com/uptrace/opentelemetry-go-extra/otelsql v0.3.2/go.mod h1:O8bHQfyinKwTXKkiKNGmLQS7vRsqRxIQTFZpYpHK3IQ= github.com/urfave/cli/v2 v2.27.4 h1:o1owoI+02Eb+K107p27wEX9Bb8eqIoZCfLXloLUSWJ8= github.com/urfave/cli/v2 v2.27.4/go.mod h1:m4QzxcD2qpra4z7WhzEGn74WZLViBnMpb1ToCAKdGRQ= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= @@ -331,8 +331,8 @@ go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8d go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= -go.starlark.net v0.0.0-20240725214946-42030a7cedce h1:YyGqCjZtGZJ+mRPaenEiB87afEO2MFRzLiJNZ0Z0bPw= -go.starlark.net v0.0.0-20240725214946-42030a7cedce/go.mod h1:YKMCv9b1WrfWmeqdV5MAuEHWsu5iC+fe6kYl2sQjdI8= +go.starlark.net v0.0.0-20240925182052-1207426daebd h1:S+EMisJOHklQxnS3kqsY8jl2y5aF0FDEdcLnOw3q22E= +go.starlark.net v0.0.0-20240925182052-1207426daebd/go.mod h1:YKMCv9b1WrfWmeqdV5MAuEHWsu5iC+fe6kYl2sQjdI8= golang.org/x/arch v0.10.0 h1:S3huipmSclq3PJMNe76NGwkBR504WFkQ5dhzWzP8ZW8= golang.org/x/arch v0.10.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=