-
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
Enforce Default TaskRun Timeout #871
Conversation
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.
Looks good to me !
test added |
The TaskRun spec describes a default timeout of ten minutes but this isn't documented anywhere else or enforced by the TaskRun reconciler. This commit: - updates the docs for TaskRuns to make the default timeout clear for users - changes the taskrun reconciler to use the default timeout if one isn't specified in the TaskRun yaml - adds a test to check whether the taskrun reconciler's checkTimeout() function is failing taskruns running longer than 10 minutes
@@ -1289,7 +1289,7 @@ func TestReconcileOnCompletedTaskRun(t *testing.T) { | |||
if err != nil { | |||
t.Fatalf("Expected completed TaskRun %s to exist but instead got error when getting it: %v", taskRun.Name, err) | |||
} | |||
if d := cmp.Diff(newTr.Status.GetCondition(apis.ConditionSucceeded), taskSt, ignoreLastTransitionTime); d != "" { | |||
if d := cmp.Diff(taskSt, newTr.Status.GetCondition(apis.ConditionSucceeded), ignoreLastTransitionTime); d != "" { |
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.
Tweaked this and line 1328 because the -want, +got
results were backwards.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dibyom, sbwsg, vdemeester 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 |
Scott has been provided super detailed helpful reviews for a while now (58 reviews as of https://tekton.devstats.cd.foundation/d/46/pr-reviews-by-contributor?orgId=1&var-period=d&var-repo_name=tektoncd%2Fpipeline&var-reviewers="sbwsg"). He has contributed useful and technically challenging features such as tektoncd#905 (recreate pods in face of ResourceQuota errors), drove completion of tektoncd#936 (Graceful sidecar support) and also tektoncd#871 (enforcing default TaskRun timeouts).
Scott has been provided super detailed helpful reviews for a while now (58 reviews as of https://tekton.devstats.cd.foundation/d/46/pr-reviews-by-contributor?orgId=1&var-period=d&var-repo_name=tektoncd%2Fpipeline&var-reviewers="sbwsg"). He has contributed useful and technically challenging features such as #905 (recreate pods in face of ResourceQuota errors), drove completion of #936 (Graceful sidecar support) and also #871 (enforcing default TaskRun timeouts).
Changes
The TaskRun spec describes a default timeout of ten minutes but this isn't documented anywhere else or enforced by the TaskRun reconciler.
This commit:
Before, TaskRuns don't timeout after ten minutes:
After, TaskRuns timeout after ten minutes by default:
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide
for more details.
Release Notes