Tags: lumjjb/pipeline
Tags
Clean up RunsToCompletion interface The RunsToCompletion interface was introduced so that PipelineRuns and Runs could conform to a common interface for CloudEvents and subsequently removed. This commit removes the redundant function PipelineRun.IsTimedOut (redundant with PipelineRun.HasTimedOut). PipelineRun.HasTimedOut was introduced so that PipelineRun would implement RunsToCompletion. "HasTimedOut" was kept (as opposed to "IsTimedOut") for the sake of consistency with TaskRun and Run. It also removes stale references to RunsToCompletion. No functional changes.
Reduce integration test run times The TestDuplicatePodTaskRun test creates 50 pods every integration run (25 for v1beta1, 25 for v1alpha1). On a successful test run in Pipelines' CI cluster this takes around 49 seconds. Locally in a kind cluster a successful run takes 40 seconds. This commit reduces the number of pods created to 10 per integration run (5 for v1beta1, 5 for v1alpha1). This drops the run time to anything from 10 seconds locally to 21 seconds for the first run in our CI (v1alpha1) and 36 seconds for the second run (v1beta1). TestStartTime takes 73 seconds in our CI and includes multiple 10 second sleeps. Reducing these to 2 seconds drops the test run time to 21 seconds. TestSidecarTaskSupport is sped up by running in parallel and exiting more quickly when the taskrun reconciler attempts to kill the sidecar containers. Log spam from this test is also reduced by sleeping inside an otherwise tight while loop.
Add reference to `Task` authoring recommendations We have `Task` authoring recommendations in the [Tekton Catalog][recommendations]. As described in tektoncd#3948, users need these recommendations but they are not easily discoverable. Therefore, adding a reference to these recommendations in `Tasks` documentation to make it more discoverable. Closes tektoncd#3948 [recommendations]: https://github.com/tektoncd/catalog/blob/main/recommendations.md
Fix panic when pending pipelinerun is failed PipelineRuns that are created with status PipelineRunPending can be placed into a failed state before their execution begins. For example: a third-party controller may be watching for pending PipelineRuns to perform some checks on them prior to execution beginning. If those checks fail the controller might choose to set the PipelineRun status to failed with a relevant error message indicating which check failed and why. Prior to this commit when a pending PR failed our metrics code could panic because the PR's StartTime is nil. This commit adds a guard to the metrics code to ensure that StartTime is not nil before computing the PR's duration. If it is nil then we assume the duration is 0. A unit test confirming this behaviour has been added as well. (cherry picked from commit 0299c6c)
PreviousNext