-
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
Any non-empty Kind
with empty APIVersion
in TaskRef
is a Task
#6459
Comments
Kind
field with empty APIVersion
is considered a Task
Kind
field with empty APIVersion
is considered a Task
Kind
field with empty APIVersion
is considered a Task
Kind
with empty APIVersion
in TaskRef
is considered a Task
Kind
with empty APIVersion
in TaskRef
is considered a Task
Kind
with empty APIVersion
in TaskRef
is a Task
We could require that |
cc @pritidesai |
/assign |
Can we say if TaskRef.Kind is not empty and not NamespacedTaskKind("Task"), and api version is not set, we should return validation error? It may make sense to set Kind to "Task"? |
Yes, it should be a validation error
No, let's not change the user-provided value in "Kind" to "Task" 🙏🏾 |
Sorry I didn't mean we should change that. This issue says "Setting Kind to any non-empty string and APIVersion to an empty string in a TaskRef will be considered a validation error." But if it is set to "Task" by user then it should be a valid case without apiversion? |
This commit closes tektoncd#6459. For a custometask reference in a pipelinetask, if the Kind is non-empty and not "Task" or "ClusterTask", then it should be a Custom task and api version should be set. If not then validation webhook should return error. Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com
This commit closes tektoncd#6459. For a customtask reference in a pipelinetask, if the Kind is non-empty and not "Task" or "ClusterTask", then it should be a Custom task and api version should be set. If not then validation webhook should return error. Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com
yes, let's leave that as a valid case, especially given that we default to setting kind to task, so users see that in the spec in the status |
/assign |
This commit closes tektoncd#6459. For a customtask reference in a pipelinetask, if the Kind is non-empty and not "Task" or "ClusterTask", then it should be a Custom task and api version should be set. If not then validation webhook should return error. Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com
This commit closes tektoncd#6459. For a customtask reference in a pipelinetask, if the Kind is non-empty and not "Task" or "ClusterTask", then it should be a Custom task and api version should be set. If not then validation webhook should return error. TaskRun's taskRef validation will be handled separately in tektoncd#6557 Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com
This commit closes tektoncd#6459. For a customtask reference in a pipelinetask, if the Kind is non-empty and not "Task" or "ClusterTask", then it should be a Custom task and api version should be set. If not then validation webhook should return error. TaskRun's taskRef validation will be handled separately in tektoncd#6557 Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com
This commit closes tektoncd#6459. For a customtask reference in a pipelinetask, if the Kind is non-empty and not "Task" or "ClusterTask", then it should be a Custom task and api version should be set. If not then validation webhook should return error. TaskRun's taskRef validation will be handled separately in tektoncd#6557 Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com
This commit closes #6459. For a customtask reference in a pipelinetask, if the Kind is non-empty and not "Task" or "ClusterTask", then it should be a Custom task and api version should be set. If not then validation webhook should return error. TaskRun's taskRef validation will be handled separately in #6557 Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com
This commit closes tektoncd#6459. For a customtask reference in a pipelinetask, if the Kind is non-empty and not "Task" or "ClusterTask", then it should be a Custom task and api version should be set. If not then validation webhook should return error. TaskRun's taskRef validation will be handled separately in tektoncd#6557 Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com
Expected Behavior
Setting
Kind
to any non-empty string andAPIVersion
to an empty string in aTaskRef
will be considered a validation error.Note that I don't expect it to be considered a
Custom Task
becauseAPIVersion
is empty.Actual Behavior
Setting
Kind
to any non-empty string andAPIVersion
to an empty string in aTaskRef
will be considered aTask
, and attempt to create aTaskRun
. This is especially a problem ifKind
is not set to"Task"
.Steps to Reproduce the Problem
PipelineRun
with aTaskRef
where theKind
is set to a non-empty string that's not"Task"
PipelineRun
statusThe text was updated successfully, but these errors were encountered: