-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
A Particular Param Syntax Makes Git Resolver Stop Working #6365
Comments
We have discussed offline that this is not a supported syntax, shall we close this issue? |
SGTM /close |
@XinruZhang: Closing this issue. In response to this:
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. |
If this syntax isn't supported, we should deny pipelineruns and taskruns that use it. This error message is confusing-- it doesn't tell users what they can do to fix the problem. (I just ran into the same issue using this syntax in pipeline tasks.) |
I think we already have docs&examples about how to use params correctly. The logic is in this function:
We overwrite the UnmarshalJSON to support string, array and object types for the same value . What you're writing here:
is the |
I was trying to reproduce an error encountered by an internal user. However, it looks like our API spec lists this syntax as "required" to support in task defaults which seems inconsistent with saying this syntax is unsupported? (I found this via
🤯 This is super confusing The specific error I got was Re: the git resolver, I'm not sure where this went wrong, but it seems like if it receives an object param called "pathInRepo" instead of a string param called "pathInRepo" it treats the "pathInRepo" as "/" which seems very user unfriendly |
Oh I see. But why referring to the api-spec doc rather than https://github.com/tektoncd/pipeline/blob/main/docs/tasks.md#specifying-parameters? The error is same, because you're passing an "object" to the "value", the "type" will be inferred as "object" and hence fail validation. |
But I agree we could improve the error messages |
I didn't refer to any docs to generate this example (it was reproducing an issue reported internally), but it's super important that our API spec reflects the syntax we want vendors to be required to support.
I think there are four AIs:
|
|
The API spec showing stringVal and arrayVal as required is confusing. It seems to be leaking our implementation details around how we implement string, array, and object params instead of the actual api field |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
/remove-lifecycle stale this issue has not been solved as far as I know. |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
@tekton-robot: Closing this issue. In response to this:
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. |
Expected Behavior
Tekton controller can successfully schedule the TaskRun when using the following Param syntax for Git Resolver
Actual Behavior
It fails to schedule the TaskRun, error message:
Steps to Reproduce the Problem
Additional Info
Environment
enable-api-fields=alpha
Kubernetes version:
Output of
kubectl version
:Tekton Pipeline version:
Output of
tkn version
Error Logs in Tekton Controller Pod
Valid Syntax
The following syntax works:
The text was updated successfully, but these errors were encountered: