-
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
Proposal: Phase out TaskRun's .status.podName #1689
Comments
I like the idea of phasing out kubernetesisms but also I use the pod name super frequently when trying to debug TasksRuns, is there a shorthand I can use to get the pod from the TaskRun if we remove this? |
If There's probably some gross bash one-liner that'd work instead of the gross bash one-liner I use today ( |
/area api |
Was this fixed by #1709? Is it safe to close? |
I think so! I know I've stopped using relying on it at least XD |
We're also using it in dashboard to construct the API for logs. If there's another approach we can take to do this (ideally without having to list pods to find a match) we could switch. |
Using |
That's exactly what I was hoping to avoid since it's another resource type we need to request and process rather than just using a field that's already available to us in the TaskRun. We can make it work though if the podName field is going away. |
It's not going away if people strongly depend on it. 😅 I guess this was more of a discussion/what-if, so if there's enough pushback I'm happy to reconsider. |
I am not pushing back 😝 I was just saying that it's still there an some tool are still using it. We can still remove it (I wouldn't mind tbh), but we will need to re-follow the deprecation policy (and hopefully make sure we don't break ourselves 😝 ) |
Along with this, I think we should add a new condition to the |
I think it's worth keeping the
If the Tekton API needs to be portable, you could use a TypedLocalObjectReference instead. That would allow the specificity of a pointer without tying it to any particular runtime. |
@afrittoli mentioned custom tasks in this context as well (#215) - if we want to customtaskruns to have a similar structure to taskruns, maybe we dont want |
I will remove the label for now, until we have an agreement on it. |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten 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. |
/remove-lifecycle rotten |
@vdemeester: Reopened 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. |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
/remove-lifecycle stale |
Discussed in today's API WG: having the pod name in the TaskRun status is useful for retrieving logs and for dashboard/cli. Longer term better solution is to leverage the results API, to provide a way for people to retrieve statuses and logs of TaskRuns. Once we have something like this in place, we will revisit removing this field from the TaskRun API. /close |
@lbernick: 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. |
Background
Today, a TaskRun identifies the name of its underlying Pod primarily using
.status.podName
field. This is used in the TaskRun controller to determine whether a Pod has already been created for a given TaskRun, and by the CLI (and probably the dashboard) to get logs from the Pod.The Pod that gets created also gets an
OwnerReference
pointing to the TaskRun that owns it (that it was created from). Owner References are largely used to identify resources that can be garbage collected (e.g., when a TaskRun is deleted, also delete its Pod).Proposal
Instead of storing the TaskRun<->Pod relationship on both objects, only store the OwnerReference on the Pod. In the TaskRun controller, we can use the PodsLister to list Pods owned by this TaskRun (of which there should be at most one). The CLI and dashboard can also perform this lookup when printing logs or other Pod details (resource utilization, etc.).
One benefit of this is that it removes a Kubernetesism from the Tekton API -- TaskRuns might not always be executed using Pods, and encouraging a reliance on
.status.podName
will make that change harder to adapt to in the future.Other Kubernetesisms (e.g., Step States, embedding the
corev1.Container
type) can be phased out alongside.status.podName
, to make the Tekton API more execution-platform-agnostic.The text was updated successfully, but these errors were encountered: