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

Parameters should default to type string #5175

Closed
jerop opened this issue Jul 20, 2022 · 14 comments
Closed

Parameters should default to type string #5175

jerop opened this issue Jul 20, 2022 · 14 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.

Comments

@jerop
Copy link
Member

jerop commented Jul 20, 2022

Expected Behavior

Pipelines with Parameters that have no "type" specified work with the default value of "string".

Actual Behavior

Pipelines with Parameters that have no "type" fail.

Example failures in dogfooding are here: https://dashboard.dogfooding.tekton.dev/#/namespaces/default/pipelineruns

Steps to Reproduce the Problem

  1. Create a Pipeline with a Parameter without a default value specified.
  2. Run the Pipeline
  3. Observe the PipelineRun logs.

Additional Info

Ran into this error when running the release Pipeline which uses the default types for Parameters - https://github.com/tektoncd/pipeline/blob/94055d92c120a6010f3d61a821e45dea4f893a74/tekton/release-pipeline.yaml

This was also observed in other Pipelines in dogfooding - tektoncd/plumbing#1148

A related issue with types in Results was fixed in #5043 and patched in release v0.37.1

  • Kubernetes version:

    Output of kubectl version:

    Client Version: v1.24.1
    Kustomize Version: v4.5.4
    Server Version: v1.21.12-gke.1500
    
  • Tekton Pipeline version:

    Output of tkn version or kubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'

    Client version: 0.24.0
    Chains version: v0.8.0
    Pipeline version: v0.37.1
    Triggers version: v0.20.1
    Dashboard version: v0.27.0
    

cc @Yongxuanzhang @chuangw6 @lbernick @dibyom @afrittoli @abayer

@jerop jerop added kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. labels Jul 20, 2022
@jerop jerop added this to the Pipelines v0.38 milestone Jul 20, 2022
@jerop
Copy link
Member Author

jerop commented Jul 20, 2022

/assign @Yongxuanzhang

@tekton-robot
Copy link
Collaborator

@jerop: GitHub didn't allow me to assign the following users: Yongxuanzhang.

Note that only tektoncd members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @Yongxuanzhang

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.

@Yongxuanzhang
Copy link
Member

/assign

@abayer
Copy link
Contributor

abayer commented Jul 20, 2022

For what it's worth, I would suggest we add a commit on the release-v0.37.x branch adding types to tekton/publish.yaml and tekton/release-pipeline.yaml so that we can actually release the branch with the fix for this cherry picked.

@abayer
Copy link
Contributor

abayer commented Jul 20, 2022

@jerop Ok, now you shouldn't actually need to worry about changing release-pipeline.yaml etc - it turns out that they were getting updated properly during the release process, but defaulting wasn't happening because the webhooks.knative.dev/exclude: "true" label was on the default namespace, skipping the webhooks entirely. 🤦 I just fixed that and existing Pipelines without param types properly got types added.

@Yongxuanzhang
Copy link
Member

So can we close this issue? Very glad that we can find out the reason eventually. 😄

@abayer
Copy link
Contributor

abayer commented Jul 20, 2022

We still need the validation/defaulting/etc to kick in for unchanged Pipelines and Tasks, so no, the PR still needs to be done. =)

@Yongxuanzhang
Copy link
Member

Yongxuanzhang commented Jul 20, 2022

We still need the validation/defaulting/etc to kick in for unchanged Pipelines and Tasks, so no, the PR still needs to be done. =)

Could you elaborate more on unchanged Pipelines and Tasks? We're planing to add SetDefaults to reconcile so even without mutating webhook, we can also add missing values. Does this solution sounds good to you?

@abayer
Copy link
Contributor

abayer commented Jul 20, 2022

Right, that's exactly what I mean. I'm just saying this issue shouldn't be closed until #5176 merges.

@Yongxuanzhang
Copy link
Member

Right, that's exactly what I mean. I'm just saying this issue shouldn't be closed until #5176 merges.

Yeah sure! Np!

@dibyom
Copy link
Member

dibyom commented Jul 20, 2022

We still need the validation/defaulting/etc to kick in for unchanged Pipelines and Tasks, so no, the PR still needs to be done. =)

Yes, we do. But the type defaulting behavior is not new and has been around for more than a release. So I don't think this issue needs to block the release

@dibyom
Copy link
Member

dibyom commented Aug 9, 2022

I think this can be closed now right @Yongxuanzhang @abayer ?

@Yongxuanzhang
Copy link
Member

I think this can be closed now right @Yongxuanzhang @abayer ?

Yeah I think so.

@abayer
Copy link
Contributor

abayer commented Aug 9, 2022

Agreed

@abayer abayer closed this as completed Aug 9, 2022
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. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.
Projects
None yet
Development

No branches or pull requests

5 participants