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

TaskRun and PipelineRun controller do not sync status on err from reconcile #1059

Closed
afrittoli opened this issue Jul 9, 2019 · 3 comments
Closed
Assignees

Comments

@afrittoli
Copy link
Member

afrittoli commented Jul 9, 2019

Expected Behavior

When reconcile returns an error, there status, labels and annotations of the TaskRun/PipelineRun should still be sync'ed back.

Actual Behavior

In case of error, the error is returned, and no update happens.
There is only a little number of cases where this is relevant; nonetheless it should be fixed and unit test coverage added

Steps to Reproduce the Problem

  1. // Reconcile this copy of the task run and then write back any status
    // updates regardless of whether the reconciliation errored out.
    if err := c.reconcile(ctx, tr); err != nil {
    c.Logger.Errorf("Reconcile error: %v", err.Error())
    return err
  2. // 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())
    return err

Additional Info

@afrittoli
Copy link
Member Author

afrittoli commented Jul 9, 2019

/assign

@tekton-robot
Copy link
Collaborator

@afrittoli: GitHub didn't allow me to assign the following users: me.

Note that only tektoncd members and repo collaborators can be assigned.
For more information please see the contributor guide

In response to this:

/assign me

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@afrittoli
Copy link
Member Author

/assign

afrittoli added a commit to afrittoli/pipeline that referenced this issue Aug 16, 2019
The TaskRun controller reconcile returns errors immediately.
It should instead first attempt to update status and labels and then
return both the original error plus any further error raised during
the update.

Fixes tektoncd#1059
afrittoli added a commit to afrittoli/pipeline that referenced this issue Aug 28, 2019
The TaskRun controller reconcile returns errors immediately.
It should instead first attempt to update status and labels and then
return both the original error plus any further error raised during
the update.

Fixes tektoncd#1059
afrittoli added a commit to afrittoli/pipeline that referenced this issue Oct 18, 2019
The TaskRun controller reconcile returns errors immediately.
It should instead first attempt to update status and labels and then
return both the original error plus any further error raised during
the update.

Fixes tektoncd#1059
afrittoli added a commit to afrittoli/pipeline that referenced this issue Oct 18, 2019
The TaskRun controller reconcile returns errors immediately.
It should instead first attempt to update status and labels and then
return both the original error plus any further error raised during
the update.

Fixes tektoncd#1059
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants