-
Notifications
You must be signed in to change notification settings - Fork 715
Check GitHub API proactively for renamed or deleted users #13143
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
Open
carols10cents
wants to merge
12
commits into
rust-lang:main
Choose a base branch
from
carols10cents:refresh-github
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
47d178e
Skeleton of what a job to update a user from GitHub will do
carols10cents 2486b4a
Add a last_sync column to the oauth_github table
carols10cents 9dff332
Implement refreshing user from GitHub
carols10cents a7bec20
Add a dry run mode to only log updates from GitHub
carols10cents 773b789
Add an admin command to enqueue a batch of user update jobs
carols10cents 748df9c
Mark add column with constant default safe
carols10cents 69b60f2
If current_user is unauthorized/forbidden, request public user info
carols10cents 8440bc6
Don't update the users table if the username hasn't changed
carols10cents 7240582
Only put dry_run and account_id in job params
carols10cents 16330d2
Remove handling of github ids < 1; they don't have oauth_github records
carols10cents dc44cff
Put info in text of log messages, not structured fields
carols10cents 7efc1be
Make priority of username updating bg jobs negative
carols10cents File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
migrations/2026-05-05-180007-0000_add_last_sync_to_oauth_github/down.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| ALTER TABLE IF EXISTS oauth_github | ||
| DROP COLUMN last_sync; |
8 changes: 8 additions & 0 deletions
8
migrations/2026-05-05-180007-0000_add_last_sync_to_oauth_github/up.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| -- safety-assured:start | ||
| -- Adding a column with a constant value default is safe because we're using Postgres > 11. | ||
| ALTER TABLE IF EXISTS oauth_github | ||
| -- Set existing rows' last sync value to 1970. | ||
| ADD COLUMN last_sync timestamptz NOT NULL DEFAULT to_timestamp(0); | ||
| -- safety-assured:end | ||
|
|
||
| comment on column oauth_github.last_sync is 'The last time we verified with GitHub what the GitHub username for this user was, and whether the account was valid'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,3 +9,4 @@ mod squash_index; | |
| mod sync_admins; | ||
| mod trustpub; | ||
| mod update_default_version; | ||
| mod update_user_from_github; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.