From 8c2fdb27d4a8ab8eb55e272a9135c6939c1ec28b Mon Sep 17 00:00:00 2001 From: Easton Crupper <65553218+ecrupper@users.noreply.github.com> Date: Thu, 4 May 2023 09:10:15 -0600 Subject: [PATCH] revert(envsubst): roll back envsubst library upgrade due to multiline secret errors (#838) * revert(envsubst): roll back envsubst library upgrade due to multiline secret errors * upgrade types --- compiler/native/substitute.go | 2 +- compiler/native/substitute_test.go | 24 ------------------------ go.mod | 4 ++-- go.sum | 8 ++++---- 4 files changed, 7 insertions(+), 31 deletions(-) diff --git a/compiler/native/substitute.go b/compiler/native/substitute.go index 402347aef..fcfd2b263 100644 --- a/compiler/native/substitute.go +++ b/compiler/native/substitute.go @@ -10,7 +10,7 @@ import ( "github.com/buildkite/yaml" - "github.com/drone/envsubst/v2" + "github.com/drone/envsubst" types "github.com/go-vela/types/yaml" ) diff --git a/compiler/native/substitute_test.go b/compiler/native/substitute_test.go index fc0718eb4..da27378ac 100644 --- a/compiler/native/substitute_test.go +++ b/compiler/native/substitute_test.go @@ -235,30 +235,6 @@ func Test_client_SubstituteSteps(t *testing.T) { }, wantErr: false, }, - { - name: "step contains escape sequences", - args: args{ - steps: yaml.StepSlice{ - { - Name: "sample", - Environment: map[string]string{ - "BUILD_MESSAGE": "`\\`\r", - "VELA_BUILD_MESSAGE": "`\\`\r", - }, - }, - }, - }, - want: yaml.StepSlice{ - { - Name: "sample", - Environment: map[string]string{ - "BUILD_MESSAGE": "`\\`\r", - "VELA_BUILD_MESSAGE": "`\\`\r", - }, - }, - }, - wantErr: false, - }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { diff --git a/go.mod b/go.mod index fd31f02c0..7e26a5732 100644 --- a/go.mod +++ b/go.mod @@ -10,10 +10,10 @@ require ( github.com/alicebob/miniredis/v2 v2.30.2 github.com/aws/aws-sdk-go v1.44.248 github.com/buildkite/yaml v0.0.0-20181016232759-0caa5f0796e3 - github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46 + github.com/drone/envsubst v1.0.3 github.com/gin-gonic/gin v1.9.0 github.com/go-playground/assert/v2 v2.2.0 - github.com/go-vela/types v0.19.1 + github.com/go-vela/types v0.19.2 github.com/golang-jwt/jwt/v5 v5.0.0 github.com/google/go-cmp v0.5.9 github.com/google/go-github/v52 v52.0.0 diff --git a/go.sum b/go.sum index 60fa83003..478dcc750 100644 --- a/go.sum +++ b/go.sum @@ -104,8 +104,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= -github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46 h1:7QPwrLT79GlD5sizHf27aoY2RTvw62mO6x7mxkScNk0= -github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46/go.mod h1:esf2rsHFNlZlxsqsZDojNBcnNs5REqIvRrWRHqX0vEU= +github.com/drone/envsubst v1.0.3 h1:PCIBwNDYjs50AsLZPYdfhSATKaRg/FJmDc2D6+C2x8g= +github.com/drone/envsubst v1.0.3/go.mod h1:N2jZmlMufstn1KEqvbHjw40h1KyTmnVzHcSc9bFiJ2g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -136,8 +136,8 @@ github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91 github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU= github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s= github.com/go-test/deep v1.0.2 h1:onZX1rnHT3Wv6cqNgYyFOOlgVKJrksuCMCRvJStbMYw= -github.com/go-vela/types v0.19.1 h1:HA5tFwju/o1QbzjhASiDJhvpHmLLmLR9e327kWp0MXg= -github.com/go-vela/types v0.19.1/go.mod h1:BvqapqTPOfHeTLiFYMa/eAzYqnujdPEd358J8TXc7l0= +github.com/go-vela/types v0.19.2 h1:xU61CX2jdMuBCtLOg8a7Z2aEWYM1zZt37Ygx1oHGbjM= +github.com/go-vela/types v0.19.2/go.mod h1:ZvDjYCKU36yJS3sLxPLCny/HLF1U6YtlOienzv/cXB4= github.com/goccy/go-json v0.10.0 h1:mXKd9Qw4NuzShiRlOXKews24ufknHO7gx30lsDyokKA= github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=