Repository: knative/client
Pull request #605 (2020-01-10 18:47:01)

refactor,fix(revision list): Refactoring and fixing issues
This PR fixes the following issues of `kn revision list`:

* `kn revision list -A` didn't work as the internal service-get requires a namespace (that from the revision)
* `kn revison list -s myservice myrevision` was not supported
* Service caching assumed that the revision list returned by the server is grouped by servicename. This is not guaranteed.
* `kn revision list -o yaml` returned yaml with the artificial and bogus annotations used for printing out in columns.
* No "0%" traffic is printed anymore

The following refactorings were added:

* The main run function was simplified and split up in multiple methods
* List-filter handling was made straight forward (and hopefully easier to understand)

I abandoned the initial intention to remove the temporary in-memory set annotations for tags and traffic as it does not fit well with the resource printer framework which only works with original K8s resource runtime. Object (and e.g. use serialization directly). I still don't like the hackish approach to misuse annotations as data container for temporary data ~~(please note, how I need to write a wrapped printer to get rid of the annotations for fixing the `-o yaml` use case, which otherwise prints out those annotations, which are not existant on the server-side)~~ (this has been replaced by a more direct approach to check for machine output), but for the sake of simplicity let's keep it (not dogmatic here).

knative-prow-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/knative/client/pull/605#" title="Author self-approved">rhuss</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=knative%2Fclient).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/knative/client/blob/master/OWNERS)~~ [rhuss]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
rhuss: cc: @maximilien 
knative-metrics-robot: The following is the coverage report on the affected files.
Say `/test pull-knative-client-go-coverage` to re-run this coverage report

File | Old Coverage | New Coverage | Delta
---- |:------------:|:------------:|:-----:
[pkg/kn/commands/revision/describe.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215706716776173569/artifacts/line-cov.html#file0) | 58.9% | 62.2% | 3.3
[pkg/kn/commands/revision/human_readable_flags.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215706716776173569/artifacts/line-cov.html#file1) | 95.5% | 61.8% | -33.7
[pkg/kn/commands/revision/list.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215706716776173569/artifacts/line-cov.html#file2) | 86.2% | 82.6% | -3.6
[pkg/kn/commands/revision/list_flags.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215706716776173569/artifacts/line-cov.html#file3) | 52.9% | 64.3% | 11.3
[pkg/kn/commands/revision/revision.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215706716776173569/artifacts/line-cov.html#file4) | 100.0% | 43.8% | -56.2

knative-prow-robot: @rhuss: The following test **failed**, say `/retest` to rerun them all:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-go-coverage | ed4aece0fe0a7ef57a17b2958c42714cf077acb7 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215706716776173569) | `/test pull-knative-client-go-coverage`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
rhuss: just removed the printer wrapper by checking directly whether a generic print output is requested. So should be simpler now.
knative-metrics-robot: The following is the coverage report on the affected files.
Say `/test pull-knative-client-go-coverage` to re-run this coverage report

File | Old Coverage | New Coverage | Delta
---- |:------------:|:------------:|:-----:
[pkg/kn/commands/revision/describe.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215709482361819136/artifacts/line-cov.html#file0) | 58.9% | 62.2% | 3.3
[pkg/kn/commands/revision/list.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215709482361819136/artifacts/line-cov.html#file2) | 86.2% | 82.8% | -3.4
[pkg/kn/commands/revision/list_flags.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215709482361819136/artifacts/line-cov.html#file3) | 52.9% | 64.3% | 11.3
[pkg/kn/commands/revision/revision.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215709482361819136/artifacts/line-cov.html#file4) | 100.0% | 43.8% | -56.2

knative-prow-robot: @rhuss: The following test **failed**, say `/retest` to rerun them all:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-go-coverage | 19538a64a88147203a4b2d6886ab931371d6b783 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215709482361819136) | `/test pull-knative-client-go-coverage`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
maximilien: You probably need to add some tests to bump the coverage of `pkg/kn/commands/revision/revision.go`
maximilien: > chore: Simplified

Will review by next WG. However, can we agree to start that "Simplified" is a misnomer :)


rhuss: > Will review by next WG. However, can we agree to start that "Simplified" is a misnomer :)

Thanks !  Really don't like the main function compared to the original monolithic (and faulty) run function ?

> * The main run function was simplified and split up in multiple methods

```golang
func(cmd *cobra.Command, args []string) error {
  namespace, err := p.GetNamespace(cmd)
  if err != nil {
    return err
  }
  client, err := p.NewServingClient(namespace)
  if err != nil {
    return err
  }

  // Create list filters
  var params []serving_v1alpha.ListConfig
  params, err = appendServiceFilter(params, client, cmd)
  if err != nil {
    return err
  }
  params, err = appendRevisionNameFilter(params, client, args)
  if err != nil {
    return err
  }

  // Query for list with filters
  revisionList, err := client.ListRevisions(params...)
  if err != nil {
    return err
  }

  // Stop if nothing found
  if len(revisionList.Items) == 0 {
    fmt.Fprintf(cmd.OutOrStdout(), "No revisions found.\n")
    return nil
  }

  // Only add temporary annotations if human readable output is requested
  if !revisionListFlags.GenericPrintFlags.OutputFlagSpecified() {
    err = enrichRevisionAnnotationsWithServiceData(p.NewServingClient, revisionList)
    if err != nil {
      return err
    }
  }

  // Sort by revision
  sortRevisionInfosByGeneration(revisionList)

  // Print out infos via printer
  printer, err := revisionListFlags.ToPrinter()
  if err != nil {
    return err
  }

  return printer.PrintObj(revisionList, cmd.OutOrStdout())
},
```

knative-metrics-robot: The following is the coverage report on the affected files.
Say `/test pull-knative-client-go-coverage` to re-run this coverage report

File | Old Coverage | New Coverage | Delta
---- |:------------:|:------------:|:-----:
[pkg/kn/commands/revision/describe.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215758434012499968/artifacts/line-cov.html#file0) | 58.9% | 62.2% | 3.3
[pkg/kn/commands/revision/list.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215758434012499968/artifacts/line-cov.html#file2) | 86.2% | 82.8% | -3.4
[pkg/kn/commands/revision/list_flags.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215758434012499968/artifacts/line-cov.html#file3) | 52.9% | 64.3% | 11.3
[pkg/kn/commands/revision/revision.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215758434012499968/artifacts/line-cov.html#file4) | 100.0% | 43.8% | -56.2

knative-prow-robot: @rhuss: The following test **failed**, say `/retest` to rerun them all:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-go-coverage | 4c6660dcb4f1273c7b6966fae951f4fee4a55915 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215758434012499968) | `/test pull-knative-client-go-coverage`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
knative-prow-robot: @rhuss: The following tests **failed**, say `/retest` to rerun them all:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-go-coverage | 4c6660dcb4f1273c7b6966fae951f4fee4a55915 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215758434012499968) | `/test pull-knative-client-go-coverage`
pull-knative-client-build-tests | 4c6660dcb4f1273c7b6966fae951f4fee4a55915 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-build-tests/1215758434016694274) | `/test pull-knative-client-build-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
rhuss: /retest
knative-metrics-robot: The following is the coverage report on the affected files.
Say `/test pull-knative-client-go-coverage` to re-run this coverage report

File | Old Coverage | New Coverage | Delta
---- |:------------:|:------------:|:-----:
[pkg/kn/commands/revision/describe.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215759565413421056/artifacts/line-cov.html#file0) | 58.9% | 62.2% | 3.3
[pkg/kn/commands/revision/list.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215759565413421056/artifacts/line-cov.html#file2) | 86.2% | 82.8% | -3.4
[pkg/kn/commands/revision/list_flags.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215759565413421056/artifacts/line-cov.html#file3) | 52.9% | 64.3% | 11.3
[pkg/kn/commands/revision/revision.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215759565413421056/artifacts/line-cov.html#file4) | 100.0% | 43.8% | -56.2

knative-prow-robot: @rhuss: The following tests **failed**, say `/retest` to rerun them all:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-build-tests | 4c6660dcb4f1273c7b6966fae951f4fee4a55915 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-build-tests/1215758434016694274) | `/test pull-knative-client-build-tests`
pull-knative-client-go-coverage | 4c6660dcb4f1273c7b6966fae951f4fee4a55915 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215759565413421056) | `/test pull-knative-client-go-coverage`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
knative-prow-robot: @rhuss: The following tests **failed**, say `/retest` to rerun them all:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-go-coverage | 4c6660dcb4f1273c7b6966fae951f4fee4a55915 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215759565413421056) | `/test pull-knative-client-go-coverage`
pull-knative-client-build-tests | 4c6660dcb4f1273c7b6966fae951f4fee4a55915 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-build-tests/1215759565417615360) | `/test pull-knative-client-build-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
rhuss: > You probably need to add some tests to bump the coverage of `pkg/kn/commands/revision/revision.go`

right, will do, if we can find some consense whether this PR is good enough to include.
knative-metrics-robot: The following is the coverage report on the affected files.
Say `/test pull-knative-client-go-coverage` to re-run this coverage report

File | Old Coverage | New Coverage | Delta
---- |:------------:|:------------:|:-----:
[pkg/kn/commands/revision/describe.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215765731048689664/artifacts/line-cov.html#file0) | 58.9% | 62.2% | 3.3
[pkg/kn/commands/revision/list.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215765731048689664/artifacts/line-cov.html#file2) | 86.2% | 82.8% | -3.4
[pkg/kn/commands/revision/list_flags.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215765731048689664/artifacts/line-cov.html#file3) | 52.9% | 64.3% | 11.3
[pkg/kn/commands/revision/revision.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215765731048689664/artifacts/line-cov.html#file4) | 100.0% | 43.8% | -56.2

knative-prow-robot: @rhuss: The following tests **failed**, say `/retest` to rerun them all:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-build-tests | 4c6660dcb4f1273c7b6966fae951f4fee4a55915 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-build-tests/1215759565417615360) | `/test pull-knative-client-build-tests`
pull-knative-client-go-coverage | 8162d79134a2c206c63570c6d98b1efbea02a20e | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1215765731048689664) | `/test pull-knative-client-go-coverage`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
navidshaikh: The output for `-A` flag needs fix
```
./kn revision list -A
NAME           SERVICE   TRAFFIC   TAGS   GENERATION   AGE    CONDITIONS   READY   REASON
foo1-jnmmc-1   foo1                       1            5d1h   0 OK / 4     False   ExitCode1 : Container failed with: Manage your Knative building blocks:

* Serving: Manage your services and release new software to them.
* Eventing: Manage event subscriptions and channels. Connect up event sources.

Usage:
  kn [command]

Available Commands:
  completion  Output shell completion code
  help        Help about any command
  plugin      Plugin command group
  revision    Revision command group
  route       Route command group
  service     Service command group
  source      Event source command group
  trigger     Trigger command group
  version     Prints the client version

Flags:
      --config string        kn config file (default is $HOME/.kn/config.yaml)
  -h, --help                 help for kn
      --kubeconfig string    kubectl config file (default is $HOME/.kube/config)
      --log-http             log http traffic
      --lookup-plugins       look for kn plugins in $PATH
      --plugins-dir string   kn plugins directory (default "~/.kn/plugins")

Use "kn [command] --help" for more information about a command.
subcommand is required

hello-pcryk-1   hello   100%         1     4d    3 OK / 4   True   
svc-rngcc-1     svc     100%         1     11d   3 OK / 4   True   
```
rhuss: Thanks for the feedback, will fix the -A view and add some more tests.
maximilien: > > * The main run function was simplified and split up in multiple methods

That I like but could be done in previous as well :) My "simplified" comment was w.r.t. other aspects of the code... which seems to have grown.

Anyhow, will try to do a thorough review after. Notice you are planning to make more changes from @navidshaikh's feedback.
rhuss: > The output for `-A` flag needs fix

I can't reproduce it. The output looks really strange, too, with the help message inbetween list columns. Could you please tell me a bit more about your setup ?
rhuss: > That I like but could be done in previous as well :) My "simplified" comment was w.r.t. other aspects of the code... which seems to have grown.

Cool. Let's try to get it simpler, looking forward to your feedback.

btw, one issue with the current approach of a namespaced `KnServingClient` is, when the namespace is nil (for -A), then only list operations work on that client instance, no get (you can't get a single object without a namespace).
So when you call `kn revision list -A` and we have to enrich service infos (tags, traffic), we have to create individual `KnServingClient` for each revision's namespace to get the referenced service. 

That makes the code a bit more complicated (as I'm also caching the clients) in `kn revision list` but as this is a corner case (other list operations don't require access to related objects), I don't think we have to revise our design decision to use a namespaced `KnServingClient`.
knative-metrics-robot: The following is the coverage report on the affected files.
Say `/test pull-knative-client-go-coverage` to re-run this coverage report

File | Old Coverage | New Coverage | Delta
---- |:------------:|:------------:|:-----:
[pkg/kn/commands/revision/describe.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217010733359828992/artifacts/line-cov.html#file0) | 58.9% | 62.2% | 3.3
[pkg/kn/commands/revision/human_readable_flags.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217010733359828992/artifacts/line-cov.html#file1) | 95.5% | 91.7% | -3.8
[pkg/kn/commands/revision/list.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217010733359828992/artifacts/line-cov.html#file2) | 86.2% | 81.6% | -4.5
[pkg/kn/commands/revision/revision.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217010733359828992/artifacts/line-cov.html#file3) | 100.0% | 43.8% | -56.2

knative-prow-robot: @rhuss: The following test **failed**, say `/retest` to rerun them all:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-go-coverage | 444eb27098660f13ebdf02e0711ee2b78c98047a | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217010733359828992) | `/test pull-knative-client-go-coverage`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
knative-metrics-robot: The following is the coverage report on the affected files.
Say `/test pull-knative-client-go-coverage` to re-run this coverage report

File | Old Coverage | New Coverage | Delta
---- |:------------:|:------------:|:-----:
[pkg/kn/commands/revision/describe.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217016268599595008/artifacts/line-cov.html#file0) | 58.9% | 62.2% | 3.3
[pkg/kn/commands/revision/human_readable_flags.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217016268599595008/artifacts/line-cov.html#file1) | 95.5% | 88.9% | -6.6
[pkg/kn/commands/revision/list.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217016268599595008/artifacts/line-cov.html#file2) | 86.2% | 81.6% | -4.5
[pkg/kn/commands/revision/revision.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217016268599595008/artifacts/line-cov.html#file3) | 100.0% | 43.8% | -56.2

knative-prow-robot: @rhuss: The following test **failed**, say `/retest` to rerun them all:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-go-coverage | 9066e0f2284df471ec2581802fb2c8f6a18016ee | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217016268599595008) | `/test pull-knative-client-go-coverage`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
navidshaikh: ```
./kn revision list -A
NAMESPACE   NAME            SERVICE   TRAFFIC   TAGS   GENERATION   AGE     CONDITIONS   READY   REASON
default     svc-rngcc-1     svc       100%             1            12d     3 OK / 4     True    
tkn-kn      foo1-jnmmc-1    foo1                       1            5d23h   0 OK / 4     False   ExitCode1 : Container failed with: Manage your ...
tkn-kn0     hello-pcryk-1   hello     100%             1            4d23h   3 OK / 4     True    
```

The help text in between revision list was coming from container error message - Truncating the text brings the list columns in shape!
lgtm

knative-metrics-robot: The following is the coverage report on the affected files.
Say `/test pull-knative-client-go-coverage` to re-run this coverage report

File | Old Coverage | New Coverage | Delta
---- |:------------:|:------------:|:-----:
[pkg/kn/commands/revision/describe.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217027216748056577/artifacts/line-cov.html#file0) | 58.9% | 62.2% | 3.3
[pkg/kn/commands/revision/human_readable_flags.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217027216748056577/artifacts/line-cov.html#file1) | 95.5% | 88.9% | -6.6
[pkg/kn/commands/revision/list.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217027216748056577/artifacts/line-cov.html#file2) | 86.2% | 81.6% | -4.5

knative-prow-robot: @rhuss: The following test **failed**, say `/retest` to rerun them all:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-build-tests | a32dadd03077914fd2fdd4797e87a75c2f2e7fac | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-build-tests/1217027216748056579) | `/test pull-knative-client-build-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
knative-metrics-robot: The following is the coverage report on the affected files.
Say `/test pull-knative-client-go-coverage` to re-run this coverage report

File | Old Coverage | New Coverage | Delta
---- |:------------:|:------------:|:-----:
[pkg/kn/commands/revision/describe.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217053897248477185/artifacts/line-cov.html#file0) | 58.9% | 62.2% | 3.3
[pkg/kn/commands/revision/human_readable_flags.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217053897248477185/artifacts/line-cov.html#file1) | 95.5% | 88.9% | -6.6
[pkg/kn/commands/revision/list.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217053897248477185/artifacts/line-cov.html#file2) | 86.2% | 81.6% | -4.5

knative-prow-robot: @rhuss: The following test **failed**, say `/retest` to rerun them all:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-build-tests | 6bab167518a22054809d95188afd53d6b707f565 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-build-tests/1217053897244282880) | `/test pull-knative-client-build-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
knative-prow-robot: @rhuss: The following tests **failed**, say `/retest` to rerun them all:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-build-tests | 6bab167518a22054809d95188afd53d6b707f565 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-build-tests/1217053897244282880) | `/test pull-knative-client-build-tests`
pull-knative-client-unit-tests | 3d75643772fe1a5f073647498532d3c2e7888b1e | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-unit-tests/1217120839640551425) | `/test pull-knative-client-unit-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
knative-prow-robot: @rhuss: The following tests **failed**, say `/retest` to rerun them all:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-build-tests | 6bab167518a22054809d95188afd53d6b707f565 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-build-tests/1217053897244282880) | `/test pull-knative-client-build-tests`
pull-knative-client-unit-tests | 3d75643772fe1a5f073647498532d3c2e7888b1e | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-unit-tests/1217120839640551425) | `/test pull-knative-client-unit-tests`
pull-knative-client-integration-tests-latest-release | 3d75643772fe1a5f073647498532d3c2e7888b1e | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-integration-tests-latest-release/1217120839632162816) | `/test pull-knative-client-integration-tests-latest-release`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
knative-prow-robot: @rhuss: The following tests **failed**, say `/retest` to rerun them all:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-build-tests | 6bab167518a22054809d95188afd53d6b707f565 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-build-tests/1217053897244282880) | `/test pull-knative-client-build-tests`
pull-knative-client-unit-tests | 3d75643772fe1a5f073647498532d3c2e7888b1e | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-unit-tests/1217120839640551425) | `/test pull-knative-client-unit-tests`
pull-knative-client-integration-tests-latest-release | 3d75643772fe1a5f073647498532d3c2e7888b1e | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-integration-tests-latest-release/1217120839632162816) | `/test pull-knative-client-integration-tests-latest-release`
pull-knative-client-integration-tests | 3d75643772fe1a5f073647498532d3c2e7888b1e | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-integration-tests/1217120839640551424) | `/test pull-knative-client-integration-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
knative-prow-robot: @rhuss: The following tests **failed**, say `/retest` to rerun them all:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-unit-tests | 3d75643772fe1a5f073647498532d3c2e7888b1e | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-unit-tests/1217120839640551425) | `/test pull-knative-client-unit-tests`
pull-knative-client-integration-tests-latest-release | 3d75643772fe1a5f073647498532d3c2e7888b1e | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-integration-tests-latest-release/1217120839632162816) | `/test pull-knative-client-integration-tests-latest-release`
pull-knative-client-integration-tests | 3d75643772fe1a5f073647498532d3c2e7888b1e | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-integration-tests/1217120839640551424) | `/test pull-knative-client-integration-tests`
pull-knative-client-build-tests | 3d75643772fe1a5f073647498532d3c2e7888b1e | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-build-tests/1217120839636357120) | `/test pull-knative-client-build-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
knative-prow-robot: @rhuss: The following tests **failed**, say `/retest` to rerun them all:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-unit-tests | 3d75643772fe1a5f073647498532d3c2e7888b1e | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-unit-tests/1217120839640551425) | `/test pull-knative-client-unit-tests`
pull-knative-client-integration-tests-latest-release | 3d75643772fe1a5f073647498532d3c2e7888b1e | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-integration-tests-latest-release/1217120839632162816) | `/test pull-knative-client-integration-tests-latest-release`
pull-knative-client-integration-tests | 3d75643772fe1a5f073647498532d3c2e7888b1e | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-integration-tests/1217120839640551424) | `/test pull-knative-client-integration-tests`
pull-knative-client-build-tests | 3d75643772fe1a5f073647498532d3c2e7888b1e | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-build-tests/1217120839636357120) | `/test pull-knative-client-build-tests`
pull-knative-client-go-coverage | 3d75643772fe1a5f073647498532d3c2e7888b1e | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217120839636357121) | `/test pull-knative-client-go-coverage`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
knative-metrics-robot: The following is the coverage report on the affected files.
Say `/test pull-knative-client-go-coverage` to re-run this coverage report

File | Old Coverage | New Coverage | Delta
---- |:------------:|:------------:|:-----:
[pkg/kn/commands/revision/describe.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217143361488556032/artifacts/line-cov.html#file0) | 58.9% | 62.2% | 3.3
[pkg/kn/commands/revision/human_readable_flags.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217143361488556032/artifacts/line-cov.html#file1) | 95.5% | 88.9% | -6.6
[pkg/kn/commands/revision/list.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217143361488556032/artifacts/line-cov.html#file2) | 86.2% | 81.6% | -4.5

knative-prow-robot: @rhuss: The following tests **failed**, say `/retest` to rerun them all:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-integration-tests-latest-release | 3d75643772fe1a5f073647498532d3c2e7888b1e | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-integration-tests-latest-release/1217120839632162816) | `/test pull-knative-client-integration-tests-latest-release`
pull-knative-client-integration-tests | 3d75643772fe1a5f073647498532d3c2e7888b1e | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-integration-tests/1217120839640551424) | `/test pull-knative-client-integration-tests`
pull-knative-client-build-tests | 0ac16767fa6feea2b074f35c950937d9a50e85c8 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-build-tests/1217143361488556034) | `/test pull-knative-client-build-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
knative-metrics-robot: The following is the coverage report on the affected files.
Say `/test pull-knative-client-go-coverage` to re-run this coverage report

File | Old Coverage | New Coverage | Delta
---- |:------------:|:------------:|:-----:
[pkg/kn/commands/revision/describe.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217154940309344257/artifacts/line-cov.html#file0) | 58.9% | 62.2% | 3.3
[pkg/kn/commands/revision/human_readable_flags.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217154940309344257/artifacts/line-cov.html#file1) | 95.5% | 88.9% | -6.6
[pkg/kn/commands/revision/list.go](https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-go-coverage/1217154940309344257/artifacts/line-cov.html#file2) | 86.2% | 81.6% | -4.5

knative-prow-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/knative/client/pull/605#pullrequestreview-343578557" title="Approved">maximilien</a>*, *<a href="https://github.com/knative/client/pull/605#" title="Author self-approved">rhuss</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=knative%2Fclient).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/knative/client/blob/master/OWNERS)~~ [maximilien,rhuss]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
rhuss: > Nicer than first PR before I reviewed but lots more verbose than using the annotations ;)

Maybe you missed it, but this PR still uses the annotations that you have introduced. It's in fact the easier approach and most suitable in this situation because otherwise you would have to implement/fake a `runtime.Object` to be able to work with the printers package. That would the bigger evil (I tried it and it looks very ugly, bloated and confusing :).

If one takes care (e.g. don't add the annotations for machine output via `-o yaml`) the annotation piggy back is not so bad (apologies for being that negative at the beginning of the discussion). Still some risk to break later, but thats imo.

> Finally, IMO the traffic and tags info is so useful that it should be in `revision list` by default. But I am OK to wait for more feedback from real world usage.

wdym ? This is included in this PR and they are printed by default. Sorry, I don't get that point ... This PR was not about reverting your contribution, it was about to fix certain issues (see PR description) and refactor a bit. Part of the fix, unfortunately, included to make it a bit more complicated (i.e. when using --all-namespaces you need to create a fresh KnServingClient for each revision to use the revision's namespace for fetching its service). 
knative-prow-robot: @rhuss: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-integration-tests | f53f44308b1f2735f16404fcb0c758cc78768f98 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-integration-tests/1217723982451576834) | `/test pull-knative-client-integration-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
navidshaikh: /lgtm
/test pull-knative-client-integration-tests
knative-prow-robot: @rhuss: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-integration-tests | f53f44308b1f2735f16404fcb0c758cc78768f98 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-integration-tests/1217732159750541312) | `/test pull-knative-client-integration-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
navidshaikh: /retest

smoke tests: timeout: service 'hello' not ready after 600 seconds
knative-prow-robot: @rhuss: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-integration-tests | f53f44308b1f2735f16404fcb0c758cc78768f98 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-integration-tests/1217741220739026944) | `/test pull-knative-client-integration-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
rhuss: > smoke tests: timeout: service 'hello' not ready after 600 seconds

At some point in time we should get rid of that flake :)

/retest
knative-prow-robot: @rhuss: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-integration-tests | f53f44308b1f2735f16404fcb0c758cc78768f98 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-integration-tests/1217754182430232576) | `/test pull-knative-client-integration-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
navidshaikh: /retest

ERROR: timeout waiting for pods to come up
ERROR: Knative setup failed
knative-prow-robot: @rhuss: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-integration-tests | f53f44308b1f2735f16404fcb0c758cc78768f98 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-integration-tests/1217774313990524928) | `/test pull-knative-client-integration-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
rhuss: /retest
knative-prow-robot: @rhuss: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-integration-tests | f53f44308b1f2735f16404fcb0c758cc78768f98 | [link](https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_client/605/pull-knative-client-integration-tests/1217805162412773376) | `/test pull-knative-client-integration-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/605). [Your PR dashboard](https://gubernator.knative.dev/pr/rhuss).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->

Patch:
diff --git a/go.mod b/go.mod
index f716f9db..9581d274 100644
--- a/go.mod
+++ b/go.mod
@@ -22,7 +22,7 @@ require (
 	knative.dev/eventing v0.11.0
 	knative.dev/pkg v0.0.0-20191203221237-94a34e416c44
 	knative.dev/serving v0.11.0
-	knative.dev/test-infra v0.0.0-20191210173947-ed220f8d779f
+	knative.dev/test-infra v0.0.0-20200116044902-d5990f0e5a05
 	sigs.k8s.io/yaml v1.1.0
 )
 
diff --git a/go.sum b/go.sum
index 425c497a..6bbbe45e 100644
--- a/go.sum
+++ b/go.sum
@@ -499,8 +499,8 @@ knative.dev/pkg v0.0.0-20191203221237-94a34e416c44 h1:WzTw8tbzXXHCFk5zOIoIp3H9Jg
 knative.dev/pkg v0.0.0-20191203221237-94a34e416c44/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
 knative.dev/serving v0.11.0 h1:FK8aPpMuiBHZbfBfT+Avxyk11TaIlOMDEw/Va2sw1w0=
 knative.dev/serving v0.11.0/go.mod h1:x2n255JS2XBI39tmjZ8CwTxIf9EKNMCrkVuiOttLRm0=
-knative.dev/test-infra v0.0.0-20191210173947-ed220f8d779f h1:Dq4tNB35wTOVw+3z2cvNJ2CMweySIw4M+WqHKMgvRlg=
-knative.dev/test-infra v0.0.0-20191210173947-ed220f8d779f/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ=
+knative.dev/test-infra v0.0.0-20200116044902-d5990f0e5a05 h1:DALgmfmA58b52qfouySXvyHCbc692C3RJUSYNjHNG5U=
+knative.dev/test-infra v0.0.0-20200116044902-d5990f0e5a05/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ=
 modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
 modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
 modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
diff --git a/pkg/kn/commands/revision/describe.go b/pkg/kn/commands/revision/describe.go
index 8259fd45..4a37f27c 100644
--- a/pkg/kn/commands/revision/describe.go
+++ b/pkg/kn/commands/revision/describe.go
@@ -108,7 +108,7 @@ func describe(w io.Writer, revision *v1alpha1.Revision, service *v1alpha1.Servic
 			serviceSection.WriteAttribute("Configuration Generation", revision.Labels[servingserving.ConfigurationGenerationLabelKey])
 			serviceSection.WriteAttribute("Latest Created", strconv.FormatBool(revision.Name == service.Status.LatestCreatedRevisionName))
 			serviceSection.WriteAttribute("Latest Ready", strconv.FormatBool(revision.Name == service.Status.LatestReadyRevisionName))
-			percent, tags := trafficForRevision(revision.Name, service)
+			percent, tags := trafficAndTagsForRevision(revision.Name, service)
 			if percent != 0 {
 				serviceSection.WriteAttribute("Traffic", strconv.FormatInt(int64(percent), 10)+"%")
 			}
@@ -269,22 +269,3 @@ func stringifyEnv(revision *v1alpha1.Revision) []string {
 	}
 	return envVars
 }
-
-func trafficForRevision(name string, service *v1alpha1.Service) (int64, []string) {
-	if len(service.Status.Traffic) == 0 {
-		return 0, nil
-	}
-	var percent int64
-	tags := []string{}
-	for _, target := range service.Status.Traffic {
-		if target.RevisionName == name {
-			if target.Percent != nil {
-				percent += *target.Percent
-			}
-			if target.Tag != "" {
-				tags = append(tags, target.Tag)
-			}
-		}
-	}
-	return percent, tags
-}
diff --git a/pkg/kn/commands/revision/human_readable_flags.go b/pkg/kn/commands/revision/human_readable_flags.go
index 65257225..32797fa0 100644
--- a/pkg/kn/commands/revision/human_readable_flags.go
+++ b/pkg/kn/commands/revision/human_readable_flags.go
@@ -17,10 +17,11 @@ package revision
 import (
 	metav1beta1 "k8s.io/apimachinery/pkg/apis/meta/v1beta1"
 	"k8s.io/apimachinery/pkg/runtime"
-	"knative.dev/client/pkg/kn/commands"
-	hprinters "knative.dev/client/pkg/printers"
 	serving "knative.dev/serving/pkg/apis/serving"
 	servingv1alpha1 "knative.dev/serving/pkg/apis/serving/v1alpha1"
+
+	"knative.dev/client/pkg/kn/commands"
+	hprinters "knative.dev/client/pkg/printers"
 )
 
 const (
@@ -28,9 +29,13 @@ const (
 	RevisionTagsAnnotation    = "client.knative.dev/tags"
 )
 
+// Max column size
+const ListColumnMaxLength = 50
+
 // RevisionListHandlers adds print handlers for revision list command
 func RevisionListHandlers(h hprinters.PrintHandler) {
 	RevisionColumnDefinitions := []metav1beta1.TableColumnDefinition{
+		{Name: "Namespace", Type: "string", Description: "Namespace of the Knative service", Priority: 0},
 		{Name: "Name", Type: "string", Description: "Name of the revision.", Priority: 1},
 		{Name: "Service", Type: "string", Description: "Name of the Knative service.", Priority: 1},
 		{Name: "Traffic", Type: "string", Description: "Percentage of traffic assigned to this revision.", Priority: 1},
@@ -49,6 +54,7 @@ func RevisionListHandlers(h hprinters.PrintHandler) {
 
 // printRevisionList populates the Knative revision list table rows
 func printRevisionList(revisionList *servingv1alpha1.RevisionList, options hprinters.PrintOptions) ([]metav1beta1.TableRow, error) {
+
 	rows := make([]metav1beta1.TableRow, 0, len(revisionList.Items))
 	for _, rev := range revisionList.Items {
 		r, err := printRevision(&rev, options)
@@ -74,15 +80,28 @@ func printRevision(revision *servingv1alpha1.Revision, options hprinters.PrintOp
 	row := metav1beta1.TableRow{
 		Object: runtime.RawExtension{Object: revision},
 	}
+
+	// Namespace is first column for "-A"
+	if options.AllNamespaces {
+		row.Cells = append(row.Cells, trunc(revision.Namespace))
+	}
+
 	row.Cells = append(row.Cells,
-		name,
-		service,
-		traffic,
-		tags,
-		generation,
-		age,
-		conditions,
-		ready,
-		reason)
+		trunc(name),
+		trunc(service),
+		trunc(traffic),
+		trunc(tags),
+		trunc(generation),
+		trunc(age),
+		trunc(conditions),
+		trunc(ready),
+		trunc(reason))
 	return []metav1beta1.TableRow{row}, nil
 }
+
+func trunc(txt string) string {
+	if len(txt) <= ListColumnMaxLength {
+		return txt
+	}
+	return string(txt[:ListColumnMaxLength-4]) + " ..."
+}
diff --git a/pkg/kn/commands/revision/list.go b/pkg/kn/commands/revision/list.go
index a8fb662f..e19bbe58 100644
--- a/pkg/kn/commands/revision/list.go
+++ b/pkg/kn/commands/revision/list.go
@@ -26,12 +26,16 @@ import (
 	"knative.dev/serving/pkg/apis/serving/v1alpha1"
 
 	"knative.dev/client/pkg/kn/commands"
-	v1alpha12 "knative.dev/client/pkg/serving/v1alpha1"
+	"knative.dev/client/pkg/kn/commands/flags"
+	serving_v1alpha "knative.dev/client/pkg/serving/v1alpha1"
 )
 
+// Service name filter, used with "-s"
+var serviceNameFilter string
+
 // NewRevisionListCommand represents 'kn revision list' command
 func NewRevisionListCommand(p *commands.KnParams) *cobra.Command {
-	revisionListFlags := NewRevisionListFlags()
+	revisionListFlags := flags.NewListPrintFlags(RevisionListHandlers)
 
 	revisionListCommand := &cobra.Command{
 		Use:   "list [name]",
@@ -58,101 +62,197 @@ func NewRevisionListCommand(p *commands.KnParams) *cobra.Command {
 			if err != nil {
 				return err
 			}
-			var revisionList *v1alpha1.RevisionList
-			if cmd.Flags().Changed("service") {
-				serviceName := cmd.Flag("service").Value.String()
 
-				// Verify that service exists
-				_, err := client.GetService(serviceName)
-				if err != nil {
-					return err
-				}
-				revisionList, err = client.ListRevisions(v1alpha12.WithService(serviceName))
-				if err != nil {
-					return err
-				}
-				if len(revisionList.Items) == 0 {
-					fmt.Fprintf(cmd.OutOrStdout(), "No revisions found for service '%s'.\n", serviceName)
-					return nil
-				}
-			} else {
-				revisionList, err = getRevisionInfo(args, client)
-				if err != nil {
-					return err
-				}
-				if len(revisionList.Items) == 0 {
-					fmt.Fprintf(cmd.OutOrStdout(), "No revisions found.\n")
-					return nil
-				}
+			// Create list filters
+			var params []serving_v1alpha.ListConfig
+			params, err = appendServiceFilter(params, client, cmd)
+			if err != nil {
+				return err
+			}
+			params, err = appendRevisionNameFilter(params, client, args)
+			if err != nil {
+				return err
 			}
 
-			// Add revision/service info as annotations: traffic and tags
-			var service *v1alpha1.Service
-			var serviceName string
-			for _, revision := range revisionList.Items {
-				if serviceName == "" || revision.Labels[serving.ServiceLabelKey] != serviceName {
-					serviceName = revision.Labels[serving.ServiceLabelKey]
-					service, err = client.GetService(serviceName)
-					if err != nil {
-						return err
-					}
-				}
+			// Query for list with filters
+			revisionList, err := client.ListRevisions(params...)
+			if err != nil {
+				return err
+			}
 
-				traffic, tags := trafficForRevision(revision.Name, service)
-				revision.Annotations[RevisionTrafficAnnotation] = fmt.Sprintf("%d%%", traffic)
-				revision.Annotations[RevisionTagsAnnotation] = strings.Join(tags, ",")
+			// Stop if nothing found
+			if len(revisionList.Items) == 0 {
+				fmt.Fprintf(cmd.OutOrStdout(), "No revisions found.\n")
+				return nil
 			}
 
-			// sort revisionList by configuration generation key
-			sort.SliceStable(revisionList.Items, func(i, j int) bool {
-				a := revisionList.Items[i]
-				b := revisionList.Items[j]
+			// Add namespace column if no namespace is given (i.e. "--all-namespaces" option is given)
+			if namespace == "" {
+				revisionListFlags.EnsureWithNamespace()
+			}
 
-				// Convert configuration generation key from string to int for avoiding string comparison.
-				agen, err := strconv.Atoi(a.Labels[serving.ConfigurationGenerationLabelKey])
-				if err != nil {
-					return a.Name < b.Name
-				}
-				bgen, err := strconv.Atoi(b.Labels[serving.ConfigurationGenerationLabelKey])
+			// Only add temporary annotations if human readable output is requested
+			if !revisionListFlags.GenericPrintFlags.OutputFlagSpecified() {
+				err = enrichRevisionAnnotationsWithServiceData(p.NewServingClient, revisionList)
 				if err != nil {
-					return a.Name < b.Name
+					return err
 				}
+			}
 
-				if agen != bgen {
-					return agen > bgen
-				}
-				return a.Name < b.Name
-			})
+			// Sort revisions by namespace, service, generation (in this order)
+			sortRevisions(revisionList)
 
+			// Print out infos via printer framework
 			printer, err := revisionListFlags.ToPrinter()
 			if err != nil {
 				return err
 			}
 
-			err = printer.PrintObj(revisionList, cmd.OutOrStdout())
-			if err != nil {
-				return err
-			}
-			return nil
+			return printer.PrintObj(revisionList, cmd.OutOrStdout())
 		},
 	}
 	commands.AddNamespaceFlags(revisionListCommand.Flags(), true)
 	revisionListFlags.AddFlags(revisionListCommand)
+	revisionListCommand.Flags().StringVarP(&serviceNameFilter, "service", "s", "", "Service name")
+
 	return revisionListCommand
 }
 
-func getRevisionInfo(args []string, client v1alpha12.KnServingClient) (*v1alpha1.RevisionList, error) {
-	var (
-		revisionList *v1alpha1.RevisionList
-		err          error
-	)
+// If a service option is given append a filter to the list of filters
+func appendServiceFilter(lConfig []serving_v1alpha.ListConfig, client serving_v1alpha.KnServingClient, cmd *cobra.Command) ([]serving_v1alpha.ListConfig, error) {
+	if !cmd.Flags().Changed("service") {
+		return lConfig, nil
+	}
+
+	serviceName := cmd.Flag("service").Value.String()
+
+	// Verify that service exists first
+	_, err := client.GetService(serviceName)
+	if err != nil {
+		return nil, err
+	}
+	return append(lConfig, serving_v1alpha.WithService(serviceName)), nil
+}
+
+// If an additional name is given append this as a revision name filter to the given list
+func appendRevisionNameFilter(lConfigs []serving_v1alpha.ListConfig, client serving_v1alpha.KnServingClient, args []string) ([]serving_v1alpha.ListConfig, error) {
+
 	switch len(args) {
 	case 0:
-		revisionList, err = client.ListRevisions()
+		// No revision name given
+		return lConfigs, nil
 	case 1:
-		revisionList, err = client.ListRevisions(v1alpha12.WithName(args[0]))
+		// Exactly one name given
+		return append(lConfigs, serving_v1alpha.WithName(args[0])), nil
 	default:
-		return nil, fmt.Errorf("'kn revision list' accepts maximum 1 argument")
+		return nil, fmt.Errorf("'kn revision list' accepts maximum 1 argument, not %d arguments as given", len(args))
+	}
+}
+
+// sortRevisions sorts revisions by namespace, service, generation and name (in this order)
+func sortRevisions(revisionList *v1alpha1.RevisionList) {
+	// sort revisionList by configuration generation key
+	sort.SliceStable(revisionList.Items, revisionListSortFunc(revisionList))
+}
+
+// revisionListSortFunc sorts by namespace, service,  generation and name
+func revisionListSortFunc(revisionList *v1alpha1.RevisionList) func(i int, j int) bool {
+	return func(i, j int) bool {
+		a := revisionList.Items[i]
+		b := revisionList.Items[j]
+
+		// By Namespace
+		aNamespace := a.Namespace
+		bNamespace := b.Namespace
+		if aNamespace != bNamespace {
+			return aNamespace < bNamespace
+		}
+
+		// By Service
+		aService := a.Labels[serving.ServiceLabelKey]
+		bService := b.Labels[serving.ServiceLabelKey]
+
+		if aService != bService {
+			return aService < bService
+		}
+
+		// By Generation
+		// Convert configuration generation key from string to int for avoiding string comparison.
+		agen, err := strconv.Atoi(a.Labels[serving.ConfigurationGenerationLabelKey])
+		if err != nil {
+			return a.Name < b.Name
+		}
+		bgen, err := strconv.Atoi(b.Labels[serving.ConfigurationGenerationLabelKey])
+		if err != nil {
+			return a.Name < b.Name
+		}
+
+		if agen != bgen {
+			return agen > bgen
+		}
+		return a.Name < b.Name
+	}
+}
+
+// Service factory function for a namespace
+type serviceFactoryFunc func(namespace string) (serving_v1alpha.KnServingClient, error)
+
+// A function which looks up a service by name
+type serviceGetFunc func(namespace, serviceName string) (*v1alpha1.Service, error)
+
+// Create revision info with traffic and tag information (if present)
+func enrichRevisionAnnotationsWithServiceData(serviceFactory serviceFactoryFunc, revisionList *v1alpha1.RevisionList) error {
+	serviceLookup := serviceLookup(serviceFactory)
+
+	for _, revision := range revisionList.Items {
+		serviceName := revision.Labels[serving.ServiceLabelKey]
+		if serviceName == "" {
+			continue
+		}
+		service, err := serviceLookup(revision.Namespace, serviceName)
+		if err != nil {
+			return err
+		}
+
+		traffic, tags := trafficAndTagsForRevision(revision.Name, service)
+		if traffic != 0 {
+			revision.Annotations[RevisionTrafficAnnotation] = fmt.Sprintf("%d%%", traffic)
+		}
+		if len(tags) > 0 {
+			revision.Annotations[RevisionTagsAnnotation] = strings.Join(tags, ",")
+		}
+	}
+	return nil
+
+}
+
+// Create a function for being able to lookup a service for an arbitrary namespace
+func serviceLookup(serviceFactory serviceFactoryFunc) serviceGetFunc {
+
+	// Two caches: For service & clients (clients might not be necessary though)
+	serviceCache := make(map[string]*v1alpha1.Service)
+	clientCache := make(map[string]serving_v1alpha.KnServingClient)
+
+	return func(namespace, serviceName string) (*v1alpha1.Service, error) {
+		if service, exists := serviceCache[serviceName]; exists {
+			return service, nil
+		}
+
+		client := clientCache[namespace]
+		if client == nil {
+			var err error
+			client, err = serviceFactory(namespace)
+			if err != nil {
+				return nil, err
+			}
+			clientCache[namespace] = client
+		}
+
+		service, err := client.GetService(serviceName)
+		if err != nil {
+			return nil, err
+		}
+		serviceCache[serviceName] = service
+		return service, nil
 	}
-	return revisionList, err
 }
diff --git a/pkg/kn/commands/revision/list_flags.go b/pkg/kn/commands/revision/list_flags.go
deleted file mode 100644
index 7d6fd309..00000000
--- a/pkg/kn/commands/revision/list_flags.go
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright © 2019 The Knative Authors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or im
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package revision
-
-import (
-	"github.com/spf13/cobra"
-	"k8s.io/cli-runtime/pkg/genericclioptions"
-	"knative.dev/client/pkg/kn/commands"
-	hprinters "knative.dev/client/pkg/printers"
-)
-
-// RevisionListFlags composes common printer flag structs
-// used in the List command.
-type RevisionListFlags struct {
-	GenericPrintFlags  *genericclioptions.PrintFlags
-	HumanReadableFlags *commands.HumanPrintFlags
-	ServiceRefFlags    *ServiceReferenceFlags
-}
-
-// AllowedFormats is the list of formats in which data can be displayed
-func (f *RevisionListFlags) AllowedFormats() []string {
-	formats := f.GenericPrintFlags.AllowedFormats()
-	formats = append(formats, f.HumanReadableFlags.AllowedFormats()...)
-	return formats
-}
-
-// ToPrinter attempts to find a composed set of RevisionListFlags suitable for
-// returning a printer based on current flag values.
-func (f *RevisionListFlags) ToPrinter() (hprinters.ResourcePrinter, error) {
-	// if there are flags specified for generic printing
-	if f.GenericPrintFlags.OutputFlagSpecified() {
-		p, err := f.GenericPrintFlags.ToPrinter()
-		if err != nil {
-			return nil, err
-		}
-		return p, nil
-	}
-	// if no flags specified, use the table printing
-	p, err := f.HumanReadableFlags.ToPrinter(RevisionListHandlers)
-	if err != nil {
-		return nil, err
-	}
-	return p, nil
-}
-
-// AddFlags receives a *cobra.Command reference and binds
-// flags related to humanreadable and template printing
-// as well as to reference a service
-func (f *RevisionListFlags) AddFlags(cmd *cobra.Command) {
-	f.GenericPrintFlags.AddFlags(cmd)
-	f.HumanReadableFlags.AddFlags(cmd)
-	f.ServiceRefFlags.SetOptional(cmd)
-}
-
-// NewRevisionListFlags returns flags associated with humanreadable,
-// template, and "name" printing, with default values set.
-func NewRevisionListFlags() *RevisionListFlags {
-	return &RevisionListFlags{
-		GenericPrintFlags:  genericclioptions.NewPrintFlags(""),
-		HumanReadableFlags: commands.NewHumanPrintFlags(),
-		ServiceRefFlags:    &ServiceReferenceFlags{},
-	}
-}
-
-// ServiceReferenceFlags compose a set of flag(s) to reference a service
-type ServiceReferenceFlags struct {
-	Name string
-}
-
-// SetOptional receives a *cobra.Command reference and
-// adds the ServiceReferenceFlags flags as optional flags
-func (s *ServiceReferenceFlags) SetOptional(cmd *cobra.Command) {
-	cmd.Flags().StringVarP(&s.Name, "service", "s", "", "Service name")
-}
diff --git a/pkg/kn/commands/revision/revision.go b/pkg/kn/commands/revision/revision.go
index 07701760..268a85c7 100644
--- a/pkg/kn/commands/revision/revision.go
+++ b/pkg/kn/commands/revision/revision.go
@@ -16,6 +16,8 @@ package revision
 
 import (
 	"github.com/spf13/cobra"
+	"knative.dev/serving/pkg/apis/serving/v1alpha1"
+
 	"knative.dev/client/pkg/kn/commands"
 )
 
@@ -29,3 +31,26 @@ func NewRevisionCommand(p *commands.KnParams) *cobra.Command {
 	revisionCmd.AddCommand(NewRevisionDeleteCommand(p))
 	return revisionCmd
 }
+
+// ============================================
+// Shared revision functions:
+
+// Extract traffic and tags for given revision from a service
+func trafficAndTagsForRevision(revision string, service *v1alpha1.Service) (int64, []string) {
+	if len(service.Status.Traffic) == 0 {
+		return 0, nil
+	}
+	var percent int64
+	var tags []string
+	for _, target := range service.Status.Traffic {
+		if target.RevisionName == revision {
+			if target.Percent != nil {
+				percent += *target.Percent
+			}
+			if target.Tag != "" {
+				tags = append(tags, target.Tag)
+			}
+		}
+	}
+	return percent, tags
+}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 6b43b114..8c58dbc5 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -667,7 +667,7 @@ knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1alpha1/fake
 knative.dev/serving/pkg/gc
 knative.dev/serving/pkg/network
 knative.dev/serving/pkg/reconciler/route/config
-# knative.dev/test-infra v0.0.0-20191210173947-ed220f8d779f
+# knative.dev/test-infra v0.0.0-20200116044902-d5990f0e5a05
 knative.dev/test-infra/scripts
 # sigs.k8s.io/kustomize v2.0.3+incompatible
 sigs.k8s.io/kustomize/pkg/commands/build


Test patch:
diff --git a/pkg/kn/commands/revision/list_test.go b/pkg/kn/commands/revision/list_test.go
index 8a913b8a..4b6e82e6 100644
--- a/pkg/kn/commands/revision/list_test.go
+++ b/pkg/kn/commands/revision/list_test.go
@@ -89,12 +89,17 @@ func TestRevisionListDefaultOutput(t *testing.T) {
 		t.Errorf("Bad action %v", action)
 	}
 	assert.Check(t, util.ContainsAll(output[0], revisionListHeader...))
-	assert.Check(t, util.ContainsAll(output[1], "bar-wxyz", "bar", "10"))
-	assert.Check(t, util.ContainsAll(output[2], "foo-wxyz", "foo", "10"))
-	assert.Check(t, util.ContainsAll(output[3], "bar-wxyz", "bar", "2"))
-	assert.Check(t, util.ContainsAll(output[4], "foo-wxyz", "foo", "2"))
-	assert.Check(t, util.ContainsAll(output[5], "bar-abcd", "bar", "1"))
-	assert.Check(t, util.ContainsAll(output[6], "foo-abcd", "foo", "1"))
+	var expectedOutput [][]string = [][]string{
+		{"bar-wxyz", "bar", "10"},
+		{"bar-wxyz", "bar", "2"},
+		{"bar-abcd", "bar", "1"},
+		{"foo-wxyz", "foo", "10"},
+		{"foo-wxyz", "foo", "2"},
+		{"foo-abcd", "foo", "1"},
+	}
+	for i, content := range expectedOutput {
+		assert.Check(t, util.ContainsAll(output[i+1], content...))
+	}
 }
 
 func TestRevisionListDefaultOutputNoHeaders(t *testing.T) {
@@ -110,8 +115,8 @@ func TestRevisionListDefaultOutputNoHeaders(t *testing.T) {
 	}
 
 	assert.Check(t, util.ContainsNone(output[0], "NAME", "URL", "GENERATION", "AGE", "CONDITIONS", "READY", "REASON"))
-	assert.Check(t, util.ContainsAll(output[0], "foo-abcd", "foo", "2"))
-	assert.Check(t, util.ContainsAll(output[1], "bar-wxyz", "bar", "1"))
+	assert.Check(t, util.ContainsAll(output[0], "bar-wxyz", "bar", "1"))
+	assert.Check(t, util.ContainsAll(output[1], "foo-abcd", "foo", "2"))
 
 }
 
@@ -152,7 +157,7 @@ func TestRevisionListForService(t *testing.T) {
 	if !action.Matches("list", "revisions") {
 		t.Errorf("Bad action %v", action)
 	}
-	assert.Assert(t, util.ContainsAll(output[0], "No", "revisions", "svc3"), "no revisions")
+	assert.Assert(t, util.ContainsAll(output[0], "No", "revisions", "found"), "no revisions")
 }
 
 func TestRevisionListOneOutput(t *testing.T) {
diff --git a/pkg/kn/commands/revision/revision_test.go b/pkg/kn/commands/revision/revision_test.go
new file mode 100644
index 00000000..86ae24e7
--- /dev/null
+++ b/pkg/kn/commands/revision/revision_test.go
@@ -0,0 +1,57 @@
+// Copyright © 2018 The Knative Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package revision
+
+import (
+	"strings"
+	"testing"
+
+	"gotest.tools/assert"
+	v1 "knative.dev/serving/pkg/apis/serving/v1"
+	"knative.dev/serving/pkg/apis/serving/v1alpha1"
+
+	"knative.dev/client/pkg/util"
+)
+
+func TestExtractTrafficAndTag(t *testing.T) {
+
+	service := &v1alpha1.Service{
+		Status: v1alpha1.ServiceStatus{
+			RouteStatusFields: v1alpha1.RouteStatusFields{
+				Traffic: []v1alpha1.TrafficTarget{
+					createTarget("myv1", 10, "v1"),
+					createTarget("myv2", 100, "v1"),
+					createTarget("myv1", 20, "stable"),
+				},
+			},
+		},
+	}
+
+	percent, tags := trafficAndTagsForRevision("myv1", service)
+
+	assert.Equal(t, percent, int64(30), "expected percentage to be added up")
+	assert.Check(t, util.ContainsAll(strings.Join(tags, ","), "v1", "stable"), "all tags included")
+
+}
+
+func createTarget(rev string, percent int64, tag string) v1alpha1.TrafficTarget {
+	return v1alpha1.TrafficTarget{
+		TrafficTarget: v1.TrafficTarget{
+			Tag:          tag,
+			RevisionName: rev,
+			Percent:      &percent,
+		},
+	}
+}
diff --git a/vendor/knative.dev/test-infra/scripts/library.sh b/vendor/knative.dev/test-infra/scripts/library.sh
index d686114c..61d6c2d0 100644
--- a/vendor/knative.dev/test-infra/scripts/library.sh
+++ b/vendor/knative.dev/test-infra/scripts/library.sh
@@ -638,5 +638,5 @@ readonly REPO_NAME_FORMATTED="Knative $(capitalize ${REPO_NAME//-/ })"
 
 # Public latest nightly or release yaml files.
 readonly KNATIVE_SERVING_RELEASE="$(get_latest_knative_yaml_source "serving" "serving")"
-readonly KNATIVE_EVENTING_RELEASE="$(get_latest_knative_yaml_source "eventing" "release")"
+readonly KNATIVE_EVENTING_RELEASE="$(get_latest_knative_yaml_source "eventing" "eventing")"
 readonly KNATIVE_MONITORING_RELEASE="$(get_latest_knative_yaml_source "serving" "monitoring")"