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 bug where PipelineRun emits task results that were never produced #3472

Merged
merged 1 commit into from Jan 12, 2021
Merged

Fix bug where PipelineRun emits task results that were never produced #3472

merged 1 commit into from Jan 12, 2021

Commits on Jan 11, 2021

  1. Filter invalid Pipeline Results from final results in PipelineRun Status

    Prior to this commit a Pipeline Result that references a Task Result of a failed TaskRun
    would end up with a value of the literal variable. For example: if Task "foo" failed,
    a Pipeline Result with value of "$(tasks.foo.results.bar)" would end up in the
    PipelineRun.Status.Results list with the literal value, "$(tasks.foo.results.bar)".
    It was therefore difficult to assess programatically whether results were populated
    correctly or were the result of some invalid TaskRun condition.
    
    This commit fixes the bug by filtering out PipelineRun Results that reference failed
    TaskRuns. It was quite difficult to follow the flow of execution wrt PipelineRun Results
    and so ultimately I had to refactor the whole lot to figure out where the bug was. The
    final code is quite a bit shorter than the original and has improved test coverage to
    more robustly exercise the behaviour of PipelineResults in various failure scenarios.
    Scott committed Jan 11, 2021
    Configuration menu
    Copy the full SHA
    86a1554 View commit details
    Browse the repository at this point in the history