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

Circumvent cache in WIC->Ethics sync #10588

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gregorbg
Copy link
Member

@gregorbg gregorbg commented Jan 9, 2025

This is (unfortunately) a very obscure fix, because the use-case is already a hack in itself.

WIC is the first team ever (to my knowledge) where two teams were merged into one (originally WDC and WEC). They want access to the historic records in both email groups, but we only support one-to-one sync.

When WIC was introduced, it was decided that they will become a rename of WDC. So they have automatic stuff to all WDC history. But they also want and need to be synced to ethics@ which is the old WEC group. We do that sync manually with a hand-crafted line of code.

The problem is that this code directly accesses the GroupsMetadataTeamsCommittees.wic shorthand. These shorthands are cached, so if the leader adds new members the list sync will not consider them until the next deploy (or reboot) which can sometimes be days apart.

This PR fixes that small inconvenience by using pluck which forces Rails to directly fire an SQL query every single time.

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.

1 participant