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

Allow unused taskRunSpec pipelineTaskName #7929

Open
jimmyjones2 opened this issue May 4, 2024 · 0 comments
Open

Allow unused taskRunSpec pipelineTaskName #7929

jimmyjones2 opened this issue May 4, 2024 · 0 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@jimmyjones2
Copy link
Contributor

Feature request

Currently a Task matching pipelineTaskName specified as part of taskRunSpecs must exist in the Pipeline (although no explicitly documented), otherwise the PipelineRun will fail:

spec:
  taskRunSpecs:
    - pipelineTaskName: build-task
      serviceAccountName: sa-for-build

However in some cases, similar to those described in #2513 and #6856, it's useful for this to be permitted, as unused parameters and workspaces are today. Changing the default behaviour would be non-breaking (although possibly slightly surprising if people were relying on the behaviour). Alternatively, an extra boolean field optional could be added (similar to mounting optional Secrets as volumes), defaulted to false. Maybe this behaviour should be extended to workspaces and parameters too, so users can choose the behaviour?

spec:
  taskRunSpecs:
    - pipelineTaskName: build-task
      optional: true
      serviceAccountName: sa-for-build

Use case

Quoting #2513 as a similar use case:

Imagine you have a system creating PipelineRuns automatically, and each PipelineRun uses a different Pipeline which has a different set of parameters. The system has a number of parameters it knows how to provide, e.g. the service account and url of a bucket the Pipelines can push to (but not all Pipelines need to push to a bucket).

It would be very convenient if the system creating the PipelineRuns could provide all the parameters it has available to all PipelineRuns, and the Pipelines could use the ones they need and ignore the rest.

@jimmyjones2 jimmyjones2 added the kind/feature Categorizes issue or PR as related to a new feature. label May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant