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 --keep Description and Remove Need to use with --all Flag #921

Merged
merged 1 commit into from
Apr 21, 2020
Merged

Fix --keep Description and Remove Need to use with --all Flag #921

merged 1 commit into from
Apr 21, 2020

Conversation

danielhelfand
Copy link
Member

Slight cleanup of --keep flag for tkn pr delete/tkn tr delete. With this change, users will no longer need to use --all with --keep but still can. This pull request will set --all to true when --keep is greater than 0. This is needed since --keep relies on funcs used with --all.

This pull request also corrects the description to clearly communicate what PipelineRuns/TaskRuns are kept when using --keep. #800 is incorrect in stating that most recent PipelineRuns/TaskRuns are not kept. I believe the original issue was opened because of #802, which caused confusion cause of what was kept.

This pull request does not solve #800 as the behavior should probably be changed later on, but it does clean up certain user experience aspects of --keep.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests (if functionality changed/added)
  • Run the code checkers with make check
  • Regenerate the manpages, docs and go formatting with make generated
  • Commit messages follow commit message best practices

Release Notes

Do not require use of --all with --keep flag and correct description of keep option to say that most recent pipelinerun/taskruns are kept

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Apr 21, 2020

CLA Check
The committers are authorized under a signed CLA.

  • ✅ Daniel Helfand (74b6913abf4856f07d29933abcb57fbe7d5aa9e3)

@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 21, 2020
@tekton-robot
Copy link
Contributor

The following is the coverage report on pkg/.
Say /test pull-tekton-cli-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/options/delete.go 93.5% 92.6% -1.0

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 21, 2020
@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

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 Apr 21, 2020
@danielhelfand
Copy link
Member Author

/hold

Slight test issue I would like to correct

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 21, 2020
dynamic: seeds[4].dynamicClient,
input: seeds[4].pipelineClient,
inputStream: nil,
wantError: false,
want: "All but 2 TaskRuns deleted in namespace \"ns\"\n",
},
{
name: "Delete all keeping 1 with --all flag",
command: []string{"delete", "-f", "--keep", "1", "-n", "ns"},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should have --all flag to verify this won't be a breaking change.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed

@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Apr 21, 2020
@tekton-robot
Copy link
Contributor

The following is the coverage report on pkg/.
Say /test pull-tekton-cli-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/options/delete.go 93.5% 92.6% -1.0

@danielhelfand
Copy link
Member Author

/hold cancel

@tekton-robot tekton-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 21, 2020
Copy link
Contributor

@pradeepitm12 pradeepitm12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 21, 2020
@tekton-robot tekton-robot merged commit a06eb4c into tektoncd:master Apr 21, 2020
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. cla: yes lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants