-
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
Move timeout, affinity, nodeSelector to taskrun and pipelinerun #463
Conversation
o no my docs |
This will rebase on your docs once its merged in and I'll update the docs accordingly |
I'm not convinced that |
@abayer this is a valid point, I was just proposing this change because it doesn't seem like there is agreement on where timeout should live. |
@pivotal-nader-ziada - I guess I think of |
@abayer can you give an example of how the timeout feature is used in jenkins that would not work in this model? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
I have left some minor comment about simplifying timeout logic in pipelinerun controller. Rest looks great @pivotal-nader-ziada .
var taskRunTimeout = &metav1.Duration{Duration: 0 * time.Second} | ||
if pr.Spec.Timeout != nil { | ||
pTimeoutTime := pr.Status.StartTime.Add(pr.Spec.Timeout.Duration) | ||
if time.Now().After(pTimeoutTime) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we simplify the timeout logic? I agree that this change was not in this PR.
taskRunTimeout = &metav1.Duration{Duration: 0 * time.Second}
if pr.Spec.Timeout != nil {
pTimeoutTime := pr.Status.StartTime.Add(pr.Spec.Timeout.Duration)
// set taskrun timeout only if its valid timeout
if !time.Now().After(pTimeoutTime) {
taskRunTimeout = pr.Spec.Timeout
}
} else {
// set timeout as nil if PR timeout is not set
taskRunTimeout = nil
}
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pivotal-nader-ziada, shashwathi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold |
I am adding hold to merge @bobcatfish docs PR first and address @abayer comments. This PR is good from my end |
/hold cancel |
- move timeout, affinity, nodeselector from task to taskrun - move timeout, affinity, nodeselector from pipeline to pipelinerun These are runtime parameters that are more concerned with the actual running of a task and not the definition
- timeout now on taskRun and PipelineRun
The following is the coverage report on pkg/.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
@pivotal-nader-ziada My biggest concern is the inability to control timeouts for individual tasks from a |
Actually, I'm going to hold off on that for the moment - lemme see how what you've implemented works out in practice. I still feel that there's a need to be able to say "if the execution of this |
Sounds good! We can definitely iterate on this @abayer :D |
Previously, if a user added an extra label, we'd propagate that to the deployment and services. However, in addition, we'd also update the selector fields in both deployments and services to use this additional label. This is unnecessary since the static set of default labels that we add on each resource is enough to match and do not need to be updated throughout the lifecycle of the resources. Fixes tektoncd#463 Co-Authored-By: Vincent Tereso <vincent.desousa.tereso@gmail.com> Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
Proposed changes
These are runtime parameters that are more concerned with the actual
running of a task more than the definition
/cc @bobcatfish @shashwathi