At Stripe, we're looking to use blue-green deploys for the mantis agents and have drafted a workflow that goes as below. This PR adds the capability to enable a set of agents that were previously disabled using a DisableTaskExecutorsRequest. This is done through adding an optional field overwriteExisting to the request. I tried to keep the changes minimal and backwards compatible. If the overwriteExisting is missing in the request, everything should behave as it did before.
The orchestration workflow we have drafted is as follows:
Let's assume we have a blue stack deployed for mantis agents.
We deploy the new version of the mantis agents as a new stack we'll call green.
Issue a request to expire the existing / active "disable requests" for the green stack using a request similar to the one below:
This kicks off the part of the code that issues ExpireDisableTaskExecutorsRequest and removes the DisableTaskExecutorsRequest stored as we have the overwriteExisting set to true.
Context
At Stripe, we're looking to use blue-green deploys for the mantis agents and have drafted a workflow that goes as below. This PR adds the capability to enable a set of agents that were previously disabled using a
DisableTaskExecutorsRequest
. This is done through adding an optional fieldoverwriteExisting
to the request. I tried to keep the changes minimal and backwards compatible. If theoverwriteExisting
is missing in the request, everything should behave as it did before.The orchestration workflow we have drafted is as follows:
blue
stack deployed for mantis agents.green
.This kicks off the part of the code that issues
ExpireDisableTaskExecutorsRequest
and removes theDisableTaskExecutorsRequest
stored as we have theoverwriteExisting
set to true.blue
stackChecklist
./gradlew build
compiles code correctly./gradlew test
passes all tests