-
Notifications
You must be signed in to change notification settings - Fork 321
Fix zulip group zulip-id availability check #1977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix zulip group zulip-id availability check #1977
Conversation
The previous `validate_zulip_group_ids` check logic is not quite correct in two ways: 1. The previous logic was too *strict*, in that it does not properly account for the case where a team member may not be included in any team-associated zulip user groups (such as via the `excluded-people` mechanism). 2. The previous logic I think was also too *loose*, in that it is possible to attach additional extra people via `extra-people`. It is possible to include a person whose `people/` entry contain only a github handle, and not also a zulip id. # Example Consider the `cloud-compute` marker-team: ```markdown name = "cloud-compute" kind = "marker-team" [people] leads = [] members = [ "have_zulip_id", "no_zulip_id", ] [[zulip-groups]] name = "cloud-compute" extra-people = [ "extra_no_zulip_id", ] excluded-people = [ "no_zulip_id", ] ``` The "all zulip group members must have a zulip-id" validation should fail, but not against `no_zulip_id`, because that member is not part of any zulip groups associated with `cloud-compute` team. It *should* error on `extra_no_zulip_id` however.
Context: the zulip groups I was trying to create for infra announcement channel. |
Dry-run check results
|
Does the old logic require that all members of teams have a zulip id? If yes, are we loosing this property with this change? |
As far as I can discern, this "obligation" is induced by being part of a Manual testingManual testing so you can try to reproduce my testing if you wish: Being part of a team does not automatically require the member to have a zulip IDUsing the compiler team
I commented out the 2 compiler zulip groups and the zulip-stream entry: #[[zulip-groups]]
#name = "T-compiler"
#
#[[zulip-groups]]
#name = "T-compiler/meeting"
#include-team-members = false
#extra-people = [
# "davidtwco",
# "wesleywiser",
# "apiraino",
# "bjorn3",
# "SparrowLii",
# "estebank",
# "BoxyUwU",
# "jieyouxu",
# "jswrenn",
# "tmiasko"
#]
#
#[[zulip-streams]]
#name = "t-compiler/contrib-private" And added
With the commit in this PR, if I uncomment (i.e. re-enable) the
And if I uncomment (i.e. re-enable) the
(The zulip stream check is not affected by this PR AFAICT.) Don't require
|
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.
This looks good.
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.
sorry it took so long!
No worries, the announcement channel is blocked on the |
The previous
validate_zulip_group_ids
check logic is not quite correct in two ways:excluded-people
mechanism).extra-people
. It is possible to include a person whosepeople/
entry contain only a github handle, and not also a zulip id.Example
Consider the
cloud-compute
marker-team:The "all zulip group members must have a zulip-id" validation should fail, but not against
no_zulip_id
, because that member is not part of any zulip groups associated withcloud-compute
team. It should error onextra_no_zulip_id
however.Review remarks
Let me know if these validations have any tests... I can't figure out if the static-api tests are intended for this purpose, I don't think so. I tested these two cases manually, and the revised logic seems to behave as I would expect it to.