Repository navigation
compose: Make pair_aggregator service stateless - #2630
Merged
Merged
Conversation
tgeoghegan
approved these changes
Oct 21, 2026
tgeoghegan
left a comment
Contributor
There was a problem hiding this comment.
Seems reasonable. But won't the aggregator ID assigned by divviup-api change? Perhaps that doesn't matter if everything else refers to the aggregator by API URL.
Collaborator
Author
|
Yeah, the aggregator ID is generated randomly during setup. I don't think this PR changes that, I'm just trying to avoid creating duplicate accounts and aggregators, while also avoiding failing to create them at all in other situations. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The change to the Docker Compose setup from #2552 introduces a different kind of failure mode. The
pair_aggregatorservice uses a named volume, which persists afterdocker compose down, and is reattached the next time the environment is brought up. The Postgres service uses an ephemeral volume, which technically does persist, but isn't ever reused. As a result, it's possible to have an old volume with a/tmp/donefile be used alongside a fresh database, leading to no initialization being done.This PR takes a different approach, removing the
/tmp/donefile altogether instead of changing where it is stored. The pairing script now runsdivviup aggregator listand checks if the expected helper aggregator is present, and then decides whether to create aggregators and an account based on the result.