-
Notifications
You must be signed in to change notification settings - Fork 265
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
Add support for Custom Tasks #1970
Comments
I wanted to create this feature request... but it's already there :) If there's a way display them based on the CRD alone, we could do that, or support some kind of plugin mechanism to support them? For things like task loops or pipelines in pipelines, we could stop relying on the status of a pipelinerun and instead search for all resources based on ownership information and/or labels, and that would give us a way to display all related resources. |
@afrittoli you mentioned on the Tekton working group this week that you were working on updating some of our existing CI jobs to use custom tasks. Can you point me at an example of some of those so I can get a feel for how they're being used in practice and how we might display something useful to the user? |
This is an example of a task loop: https://dashboard.dogfooding.tekton.dev/#/namespaces/tekton-ci/pipelineruns/plumbing-unit-tests-flfmk?pipelineTask=clone-repo&step=clone |
Thanks for the link. Looking at another example where the task loop actually ran I see that we're already retrieving the relevant Some quick notes (mostly to myself so I can pick this up again later):
|
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
/lifecycle frozen |
It might be difficult or actually not possible for the dashboard to stay on top of the various custom controller. |
Thanks @AlanGreene for linking to this issue. One approach I was thinking about was to rely on already existing dashboard extension for custom task that could provide at least the basic view over the custom task. Essentially when pipeline run view is opened in dashboard the custom task extension could be loaded. If I am not mistaken dashboard already can look at In addition the extension view could be enhanced to allow to set some extra info
(or event combine these two into link with text set to description) I don't think this has to be very advanced as if there more info to provide I believe it should be taken off the dashboard and linked to some external resource that can deliver all that's needed. Thoughts? |
Thanks for the interest and suggestions.
It could but currently does not. Last week I started working on some simple versions of the list + resource details pages for the Run resource. Initially this will be something similar to the PipelineResources page, providing a basic list of resources, and the details page for a single resource showing basic metadata + params + some other fields common to Run resources. A subsequent update (immediately after) would augment both of these pages with additional status / trigger information similar to the recent update of the TaskRuns / PipelineRuns list pages. I expect this to be included in the Dashboard v0.29 release in mid-September. These initial versions will most likely not include surfacing this information on the PipelineRun details page quite yet, but will give us a better understanding of what information is currently available to the Dashboard and what is missing / needs to be added to the custom task API to make them more useful. Some of the work for TEP-0100 (minimal status) also helps here as with that enabled we do currently render an entry in the PipelineRun details page for the custom task so at least users are aware there's a Run involved. It is not particularly useful at the moment as we don't render any log / status information for it yet. This would come as a follow up to the work I described above.
This is not applicable to all custom tasks. There are already a number of custom tasks available today that do not have an associated external service and for which a separate UI probably wouldn't make much sense. I think what we need initially is some criteria for what the Dashboard itself should attempt to display vs. what should be handled by a more specialised external service. There is some common basic metadata + status information that I think the Dashboard should always display, and we would need some convention / API field to identify how to reference / link to any additional content the custom task deems relevant / necessary. |
Looking forward to see how this will play out. thanks for the details
I believe this is the ultimate goal, so users can consider the pipeline run details page as the main entry point, which I think is already that for "normal" tasks.
Could you provide more info on this? Maybe some links to see what it is and how to enable that?
Fully agree with that, though there will be for sure some that would benefit a lot from it. As mentioned, approvals are one of them as they target users/humans that expect UI to work with. Obviously it cannot be enforced on all custom tasks but have it as optional field that when set is presented to users as link would really improve user experience.
And how do you see the extensions of custom tasks in this context? What role will they play? Maybe they can be somehow included in the details page of pipeline run link via the Run? |
https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md
This will become the default behaviour in early 2023: https://tekton.dev/docs/pipelines/deprecations/
I'm not sure I fully understand the questions. Can you clarify / expand on them? In particular, what do you mean by 'extensions of custom tasks'? |
This is the extension I was referring to https://github.com/tektoncd/dashboard/blob/main/docs/extensions.md I already have an implementation of it for approval tasks and it works really well. You can see an example here. So the idea I had was to link to that extension from the pipeline run details page based on the Run info and by that all the custom things could be shown via the extension. How does this sound to you? |
Ah I understand now, thanks. What does a Run resource look like for your approval task? This is the UI in the latest nightly build showing a Run resource for the |
I am running on the latest released version of the dashboard so don't have that yet. What's the procedure to install the nightly one? I noticed that images are in gcr so is it enough to just update the xml used for the releases? Currently use this one https://github.com/tektoncd/dashboard/releases/latest/download/tekton-dashboard-release.yaml |
Sorry I wasn't clear, I meant what does the YAML of the Run resource look like (e.g. the output of If you want to install the Dashboard nightly release you can find the release manifests in GCS, e.g.: https://storage.googleapis.com/tekton-releases-nightly/dashboard/latest/tekton-dashboard-release.yaml (same filenames as the full releases) |
thanks, will provide you that hopefully today and will also try the nightly build too! |
So here it is
and how it looks like on the UI end |
hrmm, thanks for that. It confirmed what I suspected about the labels. I wonder if labels from the custom task should be propagated to the Run, similar to how labels from a Task / Pipeline are propagated today. This would certainly simplify things from the Dashboard's perspective as we could read info from the Run resource for display in the PipelineRun without having to resolve and retrieve custom task resources too. However, the labels would likely need to be present at the time the Run is created, so would not be useful for more dynamic content. it might be worth starting a broader discussion about this as it would affect the CLI and others too. Maybe in the #general channel on Slack to start with and we can go from there, see if there are others already considering this, and determine if we need to make changes to how Runs / custom tasks are implemented. |
so that would be used to present data from within the Pipeline Run details, right? From my perspective (which could be really biased ;)) having a link to extension provided by custom task would be ideal. And speaking about extension, what kind of enhancements we could make there? Currently it is very limited to what it can display. It does not even show spec or status information. Could we make the status info to be displayed? If so, what would be possible approach to show an url as clickable link in the dashboard (extension details page)?
Please let me know if such discussion takes place I'd be more than happy to participate and provide input. thanks a lot! |
Yes the labels could be used as a source of additional information, however I'm not suggesting they would be the only information used / displayed. I agree that allowing a custom task to provide its own custom UI is useful in many cases, we would still need to agree on a mechanism to communicate the correct URL to the Dashboard and other clients consuming / displaying these resources. |
could we rely on the control that the custom resource always uses label with the name of the run?
that way knowing the run name we could easily link to the custom resource with label selector. Would that bring any value? |
We've updated the Dashboard to include list and details pages for the new v1beta1 CustomRun resource (replacement for the deprecated v1alpha1 Run resource). Planning to revisit this issue to add support for displaying them on the PipelineRun details page in the near future as we're seeing more adoption of custom tasks, including in Tekton's own dogfooding. |
/area roadmap |
Just as feedback: I was a bit puzzled when I saw the task is in pending state within the pipeline run. First, I actually thought that I did something wrong with the state handling of the CustomRun in my controller. But then I found this issue, so it is clear now. Anyway, even a "not yet implemented" display within the pipeline run could be helpful. |
Is your feature request related to a problem ?
Dashboard should support displaying (at least) all resources provided by the core Tekton projects.
It does not currently display Custom Tasks (Run CRD) in any useful manner.
Describe the solution you'd like
Add support for displaying / interacting with Custom Tasks (Run CRD) https://github.com/tektoncd/community/blob/main/teps/0002-custom-tasks.md
https://github.com/tektoncd/pipeline/blob/master/docs/runs.md
Details TBD...
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: