-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
False
-
-
False
-
subs-swatch-lightning
-
-
The swatch-billable-usage service is experiencing random failures during database migrations when it starts simultaneously with other services.
Currently, when the swatch-billable-usage service starts at the same time as swatch-tally, the billable usage migrations sometimes fail with errors like "column remittance_pending_date does not exist". This happens specifically in the migration changeset 202510051200-003, which tries to add a unique constraint on columns including remittance_pending_date. The failure occurs because both services run migrations against the same billable_usage_remittance table, but swatch-billable-usage evaluates its migration conditions while swatch-tally is still in the middle of modifying the table schema.
This creates unreliable deployments where the swatch-billable-usage service might work fine one time but fail the next, depending on the exact timing of when services start up. It's particularly problematic in environments where multiple services are deployed together, like our ephemeral environments or during rolling updates.
Acceptance Criteria
- Add precondition "<columnExists tableName="billable_usage_remittance" columnName="remittance_pending_date"/>" in 202510051200-003.
- Add precondition "<columnExists tableName="billable_usage_remittance" columnName="retry_after"/>" in 202510051200-004.
- is caused by
-
SWATCH-4042 Move billable usage migration scripts from swatch-database-migrations to swatch-billable-usage
-
- Release Pending
-