Skip to content

Add ADR 0015: switch to factory_bot; supersede ADR 0002#5120

Open
philippthun wants to merge 1 commit into
cloudfoundry:mainfrom
sap-contributions:adr-factory-bot
Open

Add ADR 0015: switch to factory_bot; supersede ADR 0002#5120
philippthun wants to merge 1 commit into
cloudfoundry:mainfrom
sap-contributions:adr-factory-bot

Conversation

@philippthun
Copy link
Copy Markdown
Member

@philippthun philippthun commented May 23, 2026

ADR 0002 (2019) chose to keep machinist after a partial factory_bot migration hit friction with Sequel's mutual-foreign-key pattern.

The blocker described there is solvable in factory_bot using a global to_create with save+refresh and after(:create) callbacks with transient flags. machinist 1.0.6 has had no upstream activity since 2013, and 2.0 is not a viable upgrade (no Sequel adapter, no Sham, non-persisting make).

Mark ADR 0002 as superseded and add ADR 0015 documenting the new decision and the patterns that made it work.

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

ADR 0002 (2019) chose to keep machinist after a partial factory_bot
migration hit friction with Sequel's mutual-foreign-key pattern.

The blocker described there is solvable in factory_bot using a global
to_create with save+refresh and after(:create) callbacks with transient
flags. machinist 1.0.6 has had no upstream activity since 2013, and 2.0
is not a viable upgrade (no Sequel adapter, no Sham, non-persisting
make).

Mark ADR 0002 as superseded and add ADR 0015 documenting the new
decision and the patterns that made it work.
@philippthun philippthun marked this pull request as ready for review May 23, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant