-
Notifications
You must be signed in to change notification settings - Fork 112
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
Default not readonly & tolerate missing permissions when removing #1062
Conversation
tektoncd#926 added a `--readonly` flag for adding readonly user permissions, however it added it with defualt "true" which means that by default when running this script to add or remove permissions, it will only modify the read only permissions and will leave any write permissions as-is. This means that when I went to update the governing board permissions - i.e. adding permissions for new members and removing permissions from old members, the script did very little and I couldn't figure out why. This commit switches the default to the writer roles - defaulting to reader is probably a safer default, however I think it's a confusing change given how the script has been used so far. Can be convinced that instead we should keep the default and add better documentation and examples (but someone else will probably need to pick that up!)
When removing permissions, if the permission to be removed isn't present, the script will stop. However, if the permission isn't there, imo that is okay and if the permissions list changes at all, this error could get it - imo it's better to keep running the script and just report any errors that couldn't be removed. I ran into this especially when I ran the remove script but only for readonly mode - from that point on I could no longer run the script for the broader permissions b/c it would encounter an error immediately since the viewer role had already been removed.
1. Finishing up updates from governing board election (andrew bayer no longer on the board, priya wadhwa joining the board) 2. jerop@ will be taking my place on the governing board while I am on leave (see [leave policy](https://github.com/tektoncd/community/blob/main/governance.md#governing-board-leave-policy)) (thanks jerop@ !!) Went through the list at https://github.com/tektoncd/community/blob/main/governance.md#changes-to-governing-board to make sure jerop and priya have all the governing board permissions and to make the changes required with andrew leaving the board. While running the permissions adding script I ran into a couple of difficulties which I've tried to fix in: * tektoncd/plumbing#1062 * tektoncd/plumbing#1061
1. Finishing up updates from governing board election (andrew bayer no longer on the board, priya wadhwa joining the board) 2. jerop@ will be taking my place on the governing board while I am on leave (see [leave policy](https://github.com/tektoncd/community/blob/main/governance.md#governing-board-leave-policy)) (thanks jerop@ !!) Went through the list at https://github.com/tektoncd/community/blob/main/governance.md#changes-to-governing-board to make sure jerop and priya have all the governing board permissions and to make the changes required with andrew leaving the board. Also added Priti to the governing board + community meeting faciltator rotation because she is listed in the rotation in the doc. While running the permissions adding script I ran into a couple of difficulties which I've tried to fix in: * tektoncd/plumbing#1062 * tektoncd/plumbing#1061
1. Finishing up updates from governing board election (andrew bayer no longer on the board, priya wadhwa joining the board) 2. @jerop will be taking my place on the governing board while I am on leave (see [leave policy](https://github.com/tektoncd/community/blob/main/governance.md#governing-board-leave-policy)) (thanks @jerop !!) Went through the list at https://github.com/tektoncd/community/blob/main/governance.md#changes-to-governing-board to make sure jerop and priya have all the governing board permissions and to make the changes required with andrew leaving the board. Also added Priti to the governing board + community meeting faciltator rotation because she is listed in the rotation in the doc. While running the permissions adding script I ran into a couple of difficulties which I've tried to fix in: * tektoncd/plumbing#1062 * tektoncd/plumbing#1061
1. Finishing up updates from governing board election (andrew bayer no longer on the board, priya wadhwa joining the board) 2. @jerop will be taking my place on the governing board while I am on leave (see [leave policy](https://github.com/tektoncd/community/blob/main/governance.md#governing-board-leave-policy)) (thanks @jerop !!) Went through the list at https://github.com/tektoncd/community/blob/main/governance.md#changes-to-governing-board to make sure jerop and priya have all the governing board permissions and to make the changes required with andrew leaving the board. Also added Priti to the governing board + community meeting faciltator rotation because she is listed in the rotation in the doc. While running the permissions adding script I ran into a couple of difficulties which I've tried to fix in: * tektoncd/plumbing#1062 * tektoncd/plumbing#1061
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/kind misc
[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 |
1. Finishing up updates from governing board election (andrew bayer no longer on the board, priya wadhwa joining the board) 2. @jerop will be taking my place on the governing board while I am on leave (see [leave policy](https://github.com/tektoncd/community/blob/main/governance.md#governing-board-leave-policy)) (thanks @jerop !!) Went through the list at https://github.com/tektoncd/community/blob/main/governance.md#changes-to-governing-board to make sure jerop and priya have all the governing board permissions and to make the changes required with andrew leaving the board. Also added Priti to the governing board + community meeting faciltator rotation because she is listed in the rotation in the doc. While running the permissions adding script I ran into a couple of difficulties which I've tried to fix in: * tektoncd/plumbing#1062 * tektoncd/plumbing#1061
/lgtm |
Changes
#926 added a
--readonly
flagfor adding readonly user permissions, however it added it with defualt
"true" which means that by default when running this script to add or
remove permissions, it will only modify the read only permissions and
will leave any write permissions as-is.
This means that when I went to update the governing board permissions -
i.e. adding permissions for new members and removing permissions from
old members, the script did very little and I couldn't figure out why.
This commit switches the default to the writer roles - defaulting to
reader is probably a safer default, however I think it's a confusing
change given how the script has been used so far. Can be convinced that
instead we should keep the default and add better documentation and
examples (but someone else will probably need to pick that up!)
When removing permissions, if the permission to be removed isn't
present, the script will stop. However, if the permission isn't there,
imo that is okay and if the permissions list changes at all, this error
could get it - imo it's better to keep running the script and just
report any errors that couldn't be removed.
I ran into this especially when I ran the remove script but only for
readonly mode - from that point on I could no longer run the script for
the broader permissions b/c it would encounter an error immediately
since the viewer role had already been removed.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide
for more details.