Page MenuHomePhabricator

Run new batches as the submitting user
AcceptedPublic

Authored by LucasWerkmeister on Oct 18 2018, 2:53 PM.
Referenced Files
Unknown Object (File)
Thu, May 18, 6:25 AM
Unknown Object (File)
Mar 15 2023, 2:57 PM
Unknown Object (File)
Feb 17 2023, 6:26 AM
Unknown Object (File)
Dec 18 2022, 12:28 PM
Unknown Object (File)
Oct 28 2022, 7:51 PM
Unknown Object (File)
Sep 8 2022, 7:42 PM
Subscribers

Details

Reviewers
Magnus
Commits
rMWc9b4abef2e6b: Update patch set 1
Patch without arc
git checkout -b D1119 && curl -L https://phabricator.wikimedia.org/D1119?download=true | git apply
Summary

This adds a new table storing OAuth details for a batch, and populates it when any new batch is created. When running commands for a batch, QuickStatements will attempt to load the OAuth details for that batch, and run the commands using those details instead of the bot account in case of success.

The effect of this is that any new batches will be run as the user who submitted the batch, instead of as the bot account. Old batches that were in progress when this commit was deployed will continue to complete as the bot account, since we don’t have OAuth details for them (and it would be odd to change the account mid-batch anyways).

Error handling is relaxed compared to surrounding code in several places, generally falling back to OAuth-less mode instead of aborting.

Diff Detail

Repository
R2010 tool-quickstatements
Lint
Lint Skipped
Unit
Tests Skipped