Skip to content

Conversation

jerop
Copy link
Member

@jerop jerop commented Jun 10, 2022

Changes

GetNamesOfTaskRuns returns a slice of the names of TaskRuns and the order is not guaranteed - this causes issues with cmp.diff that makes the tests flakey.

In this change, we sort the slice of TaskRunNames so that they can be compared in tests.

In this change, we also rename related function names and variables for clarify.

/kind cleanup

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Docs included if any changes are user facing
  • Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including functionality, content, code)
  • Release notes block below has been filled in (if there are no user facing changes, use release note "NONE")

Release Notes

NONE

@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Jun 10, 2022
@tekton-robot tekton-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 10, 2022
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lbernick

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 10, 2022
@jerop jerop force-pushed the sort-taskrunnames branch from c0c33c1 to 925be98 Compare June 10, 2022 21:49
`GetNamesOfTaskRuns` returns a slice of the names of `TaskRuns` and
the order is not guaranteed - this causes issues with cmp.diff that
makes the tests flakey.

In this change, we sort the slice of `TaskRunNames` so that they can
be compared in tests.

In this change, we also rename related function names and variables
for clarify.
@jerop jerop force-pushed the sort-taskrunnames branch from 925be98 to 028e6dd Compare June 10, 2022 22:33
@pritidesai
Copy link
Member

thank you @jerop 👍

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 10, 2022
@tekton-robot tekton-robot merged commit 6bab5f7 into tektoncd:main Jun 10, 2022
@jerop jerop deleted the sort-taskrunnames branch June 11, 2022 01:39
@jerop jerop changed the title Sort slice of TaskRunNames in tests TEP-0090: Sort slice of TaskRunNames in tests Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants