Page MenuHomePhabricator

Run new batches as the submitting user

Authored by LucasWerkmeister on Oct 18 2018, 2:53 PM.


Patch without arc
git checkout -b D1119 && curl -L | git apply

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

R2010 tool-quickstatements
Lint Skipped
Tests Skipped

Event Timeline

LucasWerkmeister created this revision.
This revision is now accepted and ready to land.Oct 18 2018, 3:28 PM