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

Fix/nil pointer reference in updateBuildRunUsingTaskRunCondition #592

Merged
merged 2 commits into from
Feb 16, 2021
Merged

Fix/nil pointer reference in updateBuildRunUsingTaskRunCondition #592

merged 2 commits into from
Feb 16, 2021

Commits on Feb 16, 2021

  1. Fix gofmt issue in buildrun_controller_test.go

    Run `gofmt -s -w` to fix issue with different formatting.
    HeavyWombat committed Feb 16, 2021
    Configuration menu
    Copy the full SHA
    9bd956f View commit details
    Browse the repository at this point in the history
  2. Fix nil pointer dereference in taskrun processing

    There seems to be a rather rare case where we have a setup in which a TaskRun
    has a completion timestamp and condition reason `TaskRunReasonFailed`, while
    the respective pod has containers which are not terminated, (yet). In this
    case the code ends up with a nil pointer dereferences and crashes the running
    operator pod. See #591 for details.
    
    Change `updateBuildRunUsingTaskRunCondition` function to set the failed
    container name only if a failed container could be looked-up.
    
    Add unit-test to construct a represenation of the error scenario and test that
    the `Reconcile` runs through without a nil pointer dereference.
    HeavyWombat committed Feb 16, 2021
    Configuration menu
    Copy the full SHA
    a098430 View commit details
    Browse the repository at this point in the history