-
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
passedConstraints
is confusing and non intuitive way of defining task dependency.
#137
Comments
Discussed this a bit with @pivotal-nader-ziada and he pointed out that before we actually change this (or anything major) we should probably make sure that the signals we get are consistent across users, since users may find different things confusing/intuitive. After discussion with @tejal29 + @aaron-prindle , I think we should make this Task about generating alternative designs, which we can compare and present to users to see what they find the least confusing. Some ideas for alternatives:
(Alternatively it might help to have very solid examples and docs explaining why we need to have passedConstraints on resources) |
Possible alternative names: |
@pivotal-nader-ziada based on our discussions in #168 I want to make sure we're on the same page about how For example, in this Pipeline, both Tasks will run simultaneously: apiVersion: pipeline.knative.dev/v1alpha1
kind: Pipeline
metadata:
name: pipeline
spec:
tasks:
- name: task-a
taskRef:
name: task
- name: task-b
taskRef:
name: task In this pipeline, the tasks will run 1. apiVersion: pipeline.knative.dev/v1alpha1
kind: Pipeline
metadata:
name: pipeline
spec:
tasks:
- name: task-a
taskRef:
name: task
inputSourceBindings:
- key: workspace
resourceRef:
name: someinput
- name: task-b
taskRef:
name: task
inputSourceBindings:
- key: workspace
resourceRef:
name: someinput
passedConstraints: [task-a] If I wanted something more complex, e.g. start 1. Run apiVersion: pipeline.knative.dev/v1alpha1
kind: Pipeline
metadata:
name: pipeline
spec:
tasks:
- name: task-a
taskRef:
name: task
inputSourceBindings:
- key: workspace
resourceRef:
name: someinput
- name: task-b1
taskRef:
name: task
inputSourceBindings:
- key: workspace
resourceRef:
name: someinput
passedConstraints: [task-a]
- name: task-b2
taskRef:
name: task
inputSourceBindings:
- key: workspace
resourceRef:
name: someinput
passedConstraints: [task-a] So in the current design, the only way to get Tasks to run in order is using This was all based on #39 which added @pivotal-nader-ziada does this match your understanding, and your intentions in #39? |
yes, this is exactly my understanding of how task dependency currently works but I don't know why you would want to express order of tasks if inputs and outputs are not related, that should be up to the pipeline engine to optimize |
I can't think of a good use case either, so maybe it's fine as is, and we can tackle this when/if we finally find one. (As long as it's an additive change to our API it wouldn't hurt anything.) |
@bobcatfish @tejal29 how about renaming All it does is say the this input resource depends on another task for example:
|
- Issue tektoncd#137 - since the "passedConstraint" flag is for indicating that the task should use that input resource coming from the task(s) in the list, "providedBy" conveys the meaning better
- Issue #137 - since the "passedConstraint" flag is for indicating that the task should use that input resource coming from the task(s) in the list, "providedBy" conveys the meaning better
…ck-images Fix check-images target
Expected Behavior
A user should be able to understand task dependency in a pipeline easily when presented with a sample pipeline definition.
Actual Behavior
User did not understand what
passedContraint
meant. Follow up question wereinputSourceBindings
Steps to Reproduce the Problem
Additional Info
The text was updated successfully, but these errors were encountered: