Better handling of cancelled CreateBotSession/UpdateBotSession requests
Context
BuildGrid/buildbox/buildbox-worker!126 (comment 1293699549)
Certain workflows with buildbox-worker
, such as receiving a SIGHUP
to reread a config file, result in an ongoing CreateBotSession
or UpdateBotSession
getting cancelled followed by a new request. BuildGrid doesn't handle this super gracefully, and the follow up request will sometimes get the following error:
An active RPC for work is in-progress for BotName=[dev/a37a1125-3b38-420c-b4c3-a9acbaa7d451]
This is to prevent issues with scheduling jobs when the current request thread is still handling the now-cancelled update, but it's not great. BuildGrid should be able to realize that the previous request was cancelled and not block the new one.