Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

triggerbinding stopped supporting multiline arguments #1782

Open
dmitry-mightydevops opened this issue Dec 10, 2024 · 0 comments
Open

triggerbinding stopped supporting multiline arguments #1782

dmitry-mightydevops opened this issue Dec 10, 2024 · 0 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@dmitry-mightydevops
Copy link

dmitry-mightydevops commented Dec 10, 2024

Expected Behavior

Triggerbinding to pass multiline argument into downstream template/task/pipeline
regression of this one?
#772

Actual Behavior

Fails with error:

{"severity":"info","timestamp":"2024-12-10T04:10:01.664Z","logger":"eventlistener","caller":"sink/sink.go:442","message":"ResolvedParams : [{Name:sdk_config_file Value:test1\ntest2\n}]","commit":"616cae1-dirty","eventlistener":"el","namespace":"ci","/triggers-eventid":"c9f6439a-3395-4867-85be-92d2f5485278","eventlistenerUID":"31e81dbf-ee50-4acb-85c8-a81d0b6005ab","/triggers-eventid":"c9f6439a-3395-4867-85be-92d2f5485278","/trigger":"sdk-trigger"}
{"severity":"error","timestamp":"2024-12-10T04:10:01.664Z","logger":"eventlistener","caller":"sink/sink.go:606","message":"problem creating obj: &errors.errorString{s:\"couldn't unmarshal json from the TriggerTemplate: invalid character '\\\\n' in string literal\"}","commit":"616cae1-dirty","eventlistener":"el","namespace":"ci","/triggers-eventid":"c9f6439a-3395-4867-85be-92d2f5485278","eventlistenerUID":"31e81dbf-ee50-4acb-85c8-a81d0b6005ab","/triggers-eventid":"c9f6439a-3395-4867-85be-92d2f5485278","/trigger":"sdk-trigger"}
{"severity":"error","timestamp":"2024-12-10T04:10:01.664Z","logger":"eventlistener","caller":"sink/sink.go:446","message":"couldn't unmarshal json from the TriggerTemplate: invalid character '\\n' in string literal","commit":"616cae1-dirty","eventlistener":"el","namespace":"ci","/triggers-eventid":"c9f6439a-3395-4867-85be-92d2f5485278","eventlistenerUID":"31e81dbf-ee50-4acb-85c8-a81d0b6005ab","/triggers-eventid":"c9f6439a-3395-4867-85be-92d2f5485278","/trigger":"sdk-trigger"}

Steps to Reproduce the Problem

apiVersion: triggers.tekton.dev/v1beta1
kind: Trigger
metadata:
  labels:
    builder: tekton
    pipeline: backend-build-pipeline
  name: sdk-trigger
  namespace: ci
spec:
  bindings:    
    - name: sdk_config_file
      value: |
        test1
        test2
  template:
    spec:
      params:        
        - name: sdk_config_file        
      resourcetemplates:
        - apiVersion: tekton.dev/v1beta1
          kind: TaskRun
          metadata:
            generateName: cel-trig-
          spec:
            taskSpec:
              steps:
                - image: ubuntu
                  script: |
                    #!/usr/bin/env bash                    
                    echo "sdk_config_file:"
                    echo $(tt.params.sdk_config_file) | tee test.txt
                    cat test.txt

Additional Info

  • Kubernetes version:
➜ k version                                
Client Version: v1.30.0
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.30.6-eks-7f9249a
  • Tekton Pipeline version:
➜ tkn version                                                         
Client version: 0.38.0
Pipeline version: v0.64.0
Triggers version: v0.29.1
Dashboard version: v0.51.0
@dmitry-mightydevops dmitry-mightydevops added the kind/bug Categorizes issue or PR as related to a bug. label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

1 participant