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

Upgrading to Triggers 0.5 from 0.4 errors if you used type: in a TT's params #583

Closed
a-roberts opened this issue May 26, 2020 · 7 comments
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@a-roberts
Copy link
Member

a-roberts commented May 26, 2020

Expected Behavior

I expected the upgrade from Triggers 0.4 to Triggers 0.5 to not require this, or to mention this in the release notes

Actual Behavior

As part of tektoncd/experimental#547 I noticed the problem and the solution is to delete all references to type: for all parameters in my TriggerTemplate, and to delete any existing TriggerTemplates

My guess is, you can have one small TriggerTemplate using type: on Triggers 0.4, then try to apply the same one on Triggers 0.5, and you'd see the error.

Steps to Reproduce the Problem

  1. An easy way to get existing Trigger Templates against Triggers 0.4 is to install the Webhooks Extension, or to simply have a template with plenty of type: values specified for params, e.g.:
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerTemplate
metadata:
  name: monitor-task-template
  namespace: tekton-pipelines
  labels:
    app.kubernetes.io/instance: default
    app.kubernetes.io/part-of: tekton-webhooks-extension
spec:
  params:
  - name: pullrequesturl
    description: The pull request url
    type: string <-- like this
  1. Then install Triggers 0.5
  2. git clone https://github.com/tektoncd/experimental.git
  3. cd webhooks-extension
  4. kubectl apply -f 400-monitor-triggertemplate.yaml
  5. observe error
  6. now remove type: for all of the params (keeping only type: pullRequest later)
  7. now delete the existing TriggerTemplates
  8. apply 400-monitor-triggertemplate.yaml again and observe the error

Additional Info

There's probably a much easier reproduce than this but it's the use case I'm particularly interested in, I'll handle things on the extension side but wondering if we want a 0.5.1 release or to call this out in the release notes?

@ncskier
Copy link
Member

ncskier commented May 26, 2020

/kind bug

@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label May 26, 2020
@a-roberts
Copy link
Member Author

Adding #532 as this was mentioned on Slack and looks to be the culprit

@dibyom
Copy link
Member

dibyom commented May 26, 2020

@a-roberts is the value of type in our TriggerTemplates always string?

There's probably a much easier reproduce than this but it's the use case I'm particularly interested in, I'll handle things on the extension side but wondering if we want a 0.5.1 release or to call this out in the release notes?

Yeah, I'll edit the release notes. The type field was undocumented and unsupported for Template params, so I'm inclined to just update the notes (vs adding in a patch release).

@a-roberts
Copy link
Member Author

@a-roberts is the value of type in our TriggerTemplates always string?

There's probably a much easier reproduce than this but it's the use case I'm particularly interested in, I'll handle things on the extension side but wondering if we want a 0.5.1 release or to call this out in the release notes?

Yeah, I'll edit the release notes. The type field was undocumented and unsupported for Template params, so I'm inclined to just update the notes (vs adding in a patch release).

Yeah that's right, https://github.com/tektoncd/experimental/blob/b45e925f437ad85c7ee840fa22d124877169740f/webhooks-extension/base/400-monitor-triggertemplate.yaml - all strings.

Initially added here tektoncd/experimental@5e70732, it's not clear why, so I'm cool with updating the notes personally although I wonder if users were using this as an API and expected an upcoming deprecation notice.

None of the examples referenced this field though so you could go either way 🤔

@tekton-robot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

@tekton-robot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Aug 14, 2020
@tekton-robot
Copy link

@tekton-robot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

Send feedback to tektoncd/plumbing.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

4 participants