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

List revisions sorted by configuration generation #332

Merged
merged 6 commits into from
Aug 6, 2019

Conversation

toVersus
Copy link
Contributor

@toVersus toVersus commented Aug 5, 2019

/lint
Fixes #289

Proposed Changes

  • Use number of configuration generation as a sort key, which is obtained from a label on the configuration resource.
  • Introduce GENERATION column referred from number of configuration generation.
  • Example output:

List all revisions

$ ./kn revision list
NAME          SERVICE   GENERATION   AGE   CONDITIONS   READY   REASON
echo-qfftl    echo      3            22h   4 OK / 4     True
hello-cjdcn   hello     3            22h   3 OK / 4     True
hello-d55vd   hello     2            22h   3 OK / 4     True
hello-hjxjw   hello     1            22h   3 OK / 4     True

Filter by service name

$ ./kn revision list -s hello
NAME          SERVICE   GENERATION   AGE   CONDITIONS   READY   REASON
hello-cjdcn   hello     3            22h   3 OK / 4     True
hello-d55vd   hello     2            22h   3 OK / 4     True
hello-hjxjw   hello     1            22h   3 OK / 4     True

We use a configuration generation as a sort key, which is obtained from a label on configuration resource.
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Aug 5, 2019
Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@toVersus: 0 warnings.

In response to this:

/lint
Fixes #289

Proposed Changes

  • Use number of configuration generation as a sort key, which is obtained from a label on the configuration resource.
  • Introduce ORDER column referred from number of configuration generation.
  • Example output:

List all revisions

$ ./kn revision list
NAME          SERVICE   ORDER   AGE    CONDITIONS   READY   REASON
echo-qfftl    echo      3       8h     4 OK / 4     True
hello-cjdcn   hello     3       8h     3 OK / 4     True
echo-mjx47    echo      2       2d4h   4 OK / 4     True
hello-d55vd   hello     2       8h     3 OK / 4     True
hello-hjxjw   hello     1       8h     3 OK / 4     True

Filter by service name

$ ./kn revision list -s hello
NAME          SERVICE   ORDER   AGE   CONDITIONS   READY   REASON
hello-cjdcn   hello     3       8h    3 OK / 4     True
hello-d55vd   hello     2       8h    3 OK / 4     True
hello-hjxjw   hello     1       8h    3 OK / 4     True

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow-robot knative-prow-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 5, 2019
@knative-prow-robot
Copy link
Contributor

Hi @toVersus. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 5, 2019
@rhuss
Copy link
Contributor

rhuss commented Aug 5, 2019

/ok-to-test

@knative-prow-robot knative-prow-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 5, 2019
pkg/kn/commands/revision/human_readable_flags.go Outdated Show resolved Hide resolved
pkg/kn/commands/revision/human_readable_flags.go Outdated Show resolved Hide resolved
pkg/kn/commands/revision/revision_list.go Outdated Show resolved Hide resolved
pkg/kn/commands/revision/revision_list.go Outdated Show resolved Hide resolved
pkg/kn/commands/revision/revision_list_test.go Outdated Show resolved Hide resolved
test/e2e/revision_test.go Outdated Show resolved Hide resolved
test/e2e/revision_test.go Outdated Show resolved Hide resolved
test/e2e/revision_test.go Show resolved Hide resolved
test/e2e/revision_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@rhuss rhuss left a comment

Choose a reason for hiding this comment

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

except for one minor details looks good to me.

pkg/kn/commands/revision/revision_list.go Outdated Show resolved Hide resolved
@rhuss
Copy link
Contributor

rhuss commented Aug 6, 2019

@toVersus ah, and yes, could you please update the top-level CHANGELOG.adoc, too with this fix ?

@toVersus
Copy link
Contributor Author

toVersus commented Aug 6, 2019

@rhuss, thanks for your review! I addressed your comments and also updated CHANGELOG.adoc.

@knative-metrics-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/kn/commands/revision/human_readable_flags.go 94.7% 95.0% 0.3
pkg/kn/commands/revision/revision_list.go 85.7% 85.2% -0.5

@rhuss
Copy link
Contributor

rhuss commented Aug 6, 2019

Thanks !

/approve
/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 6, 2019
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhuss, toVersus

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

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 6, 2019
@knative-prow-robot knative-prow-robot merged commit 8e5302c into knative:master Aug 6, 2019
@toVersus toVersus deleted the issue/289 branch August 6, 2019 12:49
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 Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Order the revisions in kn revision list output by configuration generation number
5 participants