Description of problem:
`oc get project name --watch` run by cluster-admin should not print all projects first
Resource like `oc get pod name --watch` does not have the issue.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Suppose cluster-admin wants to watch an existing project xxia-proj, run:
oc get project xxia-proj --watch
1. It prints all projects first
1. It needs not print all projects, because I only want to watch one project
Normal user of multiple projects does not has the issue
You can work around this issue by getting the namespace instead:
oc get namespace xxia-proj --watch
It appears that when watching events for a single, particular project, as a cluster admin, `watch.Until()` will return events for all other projects in the cluster, despite asking to watch a single, particular project.
I will investigate this further, for now I have a patch that handles this case at the command level .
Updated Origin PR: https://github.com/openshift/origin/pull/21167
Commit pushed to master at https://github.com/openshift/origin
fix projects when watching with selector
Filters events for projects on membership-change for a user based on a
field or label selector provided by a consumer of project events.
Checked in latest 3.11.36, issue still exists. Looks like the code only goes into 4.0? If yes, pls update Target Release and drop bug from above 3.11 advisory. Thanks
Tested 4.0.0-0.47.0, the issue is fixed.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.