gocardless / statesman

A statesmanlike state machine library.
https://gocardless.com/blog/statesman/
MIT License
1.78k stars 163 forks source link

storage_adapter(Statesman::Adapters::ActiveRecord) attempts DB connection during Rails assets:precompile #401

Closed simmerz closed 4 years ago

simmerz commented 4 years ago

I'm running off github master. Somewhen between 63059913d394fec203509ea884e527f4ba2f17f9 and 2f4be411fdd65f10d63fbcfd0b61d9d5a46e26ff this behaviour has changed, which means a compile stage in CI where there is no DB fails.

lawrencejones commented 4 years ago

Hey @simmerz , thanks for the note here. @thom-oman and are mid-way through a release to support a MySQL optimisation and were aware master was a bit broken, just didn't expect anyone to be running on it.

We tend to think carefully about our release cadence to avoid breaking people. Is there a reason you can't use an official release for now? We'll probably have this fixed sometime next week.

simmerz commented 4 years ago

I should have pinned to the specific ref, which would also have reminded me to upgrade to the latest release when it came out. And now I can't remember the reason why I used 6305991 - was probably during an early upgrade to Rails 6.

lawrencejones commented 4 years ago

Cool, I'm going to leave this issue open but I don't think we should revert the broken commit, as we don't expect people to run on master. Will tag this issue once we've resolved it.

Thank you for letting us know!

thom-oman commented 4 years ago

Fixed by https://github.com/gocardless/statesman/commit/c11e03921867d46ee43edf473deadc5e5576d242