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

sync zulip stream membership #1604

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

davidtwco
Copy link
Member

@davidtwco davidtwco commented Nov 4, 2024

See rust-lang/sync-team#92 for the other half of this.

t-compiler want to use our private Zulip stream for some communications but we've held off on doing this as the membership of that stream is manually managed, that is inconvenient and we sometimes forget. In testing this patch, I found the stream membership was still out-of-sync!

I've tested this locally with the sync-team changes locally and absent the untested parts noted in that PR's description, it all works.

I've deliberately avoided adding an exhaustive schema for the streams, just their name as that's all that is necessary to adjust the membership, and that's all that the compiler team needs.

There's a reasonable amount of duplication with the types and functions for Zulip user groups, but we'll likely extend these types to manage more about streams, I think that's okay. Everything I've added should be reusable and compatible with representing streams fully, but I'll leave that for other patches like #1244.

@ehuss
Copy link
Contributor

ehuss commented Nov 4, 2024

Just so I'm clear, is the intention that this is only for private streams? I'm a little unclear, but it looks like it removes people if they are not explicitly listed in the team database, is that correct?

Can you add some docs to https://github.com/rust-lang/team/blob/master/docs/toml-schema.md documenting the new TOML structure?

@davidtwco
Copy link
Member Author

Just so I'm clear, is the intention that this is only for private streams? I'm a little unclear, but it looks like it removes people if they are not explicitly listed in the team database, is that correct?

Can you add some docs to https://github.com/rust-lang/team/blob/master/docs/toml-schema.md documenting the new TOML structure?

Yeah, this would primarily be used for private streams.

@davidtwco
Copy link
Member Author

Can you add some docs to https://github.com/rust-lang/team/blob/master/docs/toml-schema.md documenting the new TOML structure?

Added

docs/toml-schema.md Outdated Show resolved Hide resolved
@MarcoIeni
Copy link
Member

MarcoIeni commented Nov 7, 2024

The static_api test is failing in CI.

Also we could use flatten to get rid of the duplicated code 👍

@davidtwco
Copy link
Member Author

Fixed the test and removed a bunch of the duplicated code

docs/toml-schema.md Outdated Show resolved Hide resolved
rust_team_data/src/v1.rs Outdated Show resolved Hide resolved
src/validate.rs Outdated Show resolved Hide resolved
src/validate.rs Outdated Show resolved Hide resolved
@MarcoIeni
Copy link
Member

Overall looks good to me! I just left a few minor comments 👍

Copy link
Member

@MarcoIeni MarcoIeni left a comment

Choose a reason for hiding this comment

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

This looks good from my perspective.
Maybe we can merge it once rust-lang/sync-team#92 is also approved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants