From 3e8130c1d4b295f92d1f454d79cfe4de223050a7 Mon Sep 17 00:00:00 2001 From: Ali Koyuncu Date: Wed, 23 Aug 2023 18:43:20 +0300 Subject: [PATCH 1/2] feat: add all sprig functions to templates Signed-off-by: Ali Koyuncu --- sensors/dependencies/filter.go | 2 +- sensors/triggers/params.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sensors/dependencies/filter.go b/sensors/dependencies/filter.go index 96c8cfecc1..d96341cdd3 100644 --- a/sensors/dependencies/filter.go +++ b/sensors/dependencies/filter.go @@ -238,7 +238,7 @@ filterData: } if f.Template != "" { - tpl, tplErr := template.New("param").Funcs(sprig.HermeticTxtFuncMap()).Parse(f.Template) + tpl, tplErr := template.New("param").Funcs(sprig.FuncMap()).Parse(f.Template) if tplErr != nil { if operator == v1alpha1.OrLogicalOperator { errMessages = append(errMessages, tplErr.Error()) diff --git a/sensors/triggers/params.go b/sensors/triggers/params.go index 7bda102e59..9334e9b431 100644 --- a/sensors/triggers/params.go +++ b/sensors/triggers/params.go @@ -275,7 +275,7 @@ func ResolveParamValue(src *v1alpha1.TriggerParameterSource, events map[string]* // the raw json bytes and then returns the result or any error func getValueWithTemplate(value []byte, templString string) (string, error) { res := gjson.ParseBytes(value) - tpl, err := template.New("param").Funcs(sprig.HermeticTxtFuncMap()).Parse(templString) + tpl, err := template.New("param").Funcs(sprig.FuncMap()).Parse(templString) if err != nil { return "", err } From 92a5f5e2f591db4cbb0a0ba5ceaaa5263d7432c8 Mon Sep 17 00:00:00 2001 From: Ali Koyuncu Date: Tue, 5 Sep 2023 15:58:47 +0300 Subject: [PATCH 2/2] feat: increase codegen workflow job timeout Signed-off-by: Ali Koyuncu --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2d54803530..21e3970257 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,7 +14,7 @@ jobs: codegen: name: Codegen runs-on: ubuntu-latest - timeout-minutes: 5 + timeout-minutes: 7 steps: - name: Checkout code uses: actions/checkout@v3