moov-io / achgateway

Payment gateway enabling automated ACH operations in a distributed and fault tolerant way.
https://moov-io.github.io/achgateway/
Apache License 2.0
52 stars 19 forks source link

admin: return status of each shard after /trigger-cutoff #87

Closed adamdecaf closed 2 years ago

adamdecaf commented 2 years ago

When we manually trigger shards it would be helpful to return the result of each shard in the response. An example is below.

{
  "shards": {
    "testing": "skipped",
    "prod": "completed",
    "uat": "errored"
  }
}

The possible values at first could be skipped, errored and completed. The skipped comes into play when we trigger only some of the shards.

We've ran into some issues in the real world where /trigger-cutoff isn't fully applied to every instance properly to maintain consistent state.

adamdecaf commented 2 years ago

FYI this does break the error response, but I'm not aware of anyone using that.