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

timeout_handler small fixes #681

Merged
merged 1 commit into from
Mar 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions pkg/reconciler/timeout_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ func getTimeout(d *metav1.Duration) time.Duration {
func (t *TimeoutSet) checkPipelineRunTimeouts(namespace string) {
pipelineRuns, err := t.pipelineclientset.TektonV1alpha1().PipelineRuns(namespace).List(metav1.ListOptions{})
if err != nil {
t.logger.Errorf("Can't get taskruns list in namespace %s: %s", namespace, err)
t.logger.Errorf("Can't get pipelinerun list in namespace %s: %s", namespace, err)
return
}
for _, pipelineRun := range pipelineRuns.Items {
pipelineRun := pipelineRun
Expand All @@ -140,6 +141,7 @@ func (t *TimeoutSet) CheckTimeouts() {
namespaces, err := t.kubeclientset.CoreV1().Namespaces().List(metav1.ListOptions{})
if err != nil {
t.logger.Errorf("Can't get namespaces list: %s", err)
return
}
for _, namespace := range namespaces.Items {
t.checkTaskRunTimeouts(namespace.GetName())
Expand All @@ -152,7 +154,8 @@ func (t *TimeoutSet) CheckTimeouts() {
func (t *TimeoutSet) checkTaskRunTimeouts(namespace string) {
taskruns, err := t.pipelineclientset.TektonV1alpha1().TaskRuns(namespace).List(metav1.ListOptions{})
if err != nil {
t.logger.Errorf("Can't get taskruns list in namespace %s: %s", namespace, err)
t.logger.Errorf("Can't get taskrun list in namespace %s: %s", namespace, err)
return
}
for _, taskrun := range taskruns.Items {
taskrun := taskrun
Expand Down Expand Up @@ -218,7 +221,7 @@ func (t *TimeoutSet) WaitPipelineRun(pr *v1alpha1.PipelineRun) {
// we're stopping, give up
return
case <-finished:
// taskrun finished, we can stop watching
// pipelinerun finished, we can stop watching
return
case <-time.After(timeout):
t.StatusLock(pr)
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/v1alpha1/pipelinerun/pipelinerun.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func (c *Reconciler) Reconcile(ctx context.Context, key string) error {
return err
}

// Reconcile this copy of the task run and then write back any status or label
// Reconcile this copy of the pipelinerun and then write back any status or label
// updates regardless of whether the reconciliation errored out.
if err = c.reconcile(ctx, pr); err != nil {
c.Logger.Errorf("Reconcile error: %v", err.Error())
Expand Down