0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-08 17:53:55 +08:00
discourse/lib/service
Martin Brennan 47797c6247
DEV: Apply claude review fixes to Apply service
DesignWizard::Apply set site settings itself via set_and_log, then hand-rolled
an after_rollback callback to put the in-process SiteSetting cache back if a
later write blew up. That compensation only ever fired if a third-party
:site_setting_changed subscriber raised — already an unhandled 500 — and half
of it was dead code, since after_rollback runs once the site_settings rows have
already been reverted. It also forced transaction(requires_new: true), which
meant a savepoint whose only purpose was to make the callback fire under
transactional fixtures.

Delegate to SiteSetting::Update instead. It brings type coercion, dependency
ordering, and the deprecation/shadowing/visibility/configurability policies —
notably fixing a case where the wizard reported success but silently did
nothing when default_theme_id was shadowed by a GlobalSetting. It opens its own
transaction, so the step moves out of ours, which now wraps only the theme and
palette writes. default_theme_id is hidden, so it's passed via
allow_changing_hidden.

Also extracts the palette selectability writes into a dedicated action, and
reverts the transaction option plumbing added to the service base, which no
longer has a caller.
2026-08-07 11:23:44 +10:00
..
base DEV: Apply claude review fixes to Apply service 2026-08-07 11:23:44 +10:00
action_base.rb DEV: Extract step classes from Service::Base into individual files (#37956) 2026-02-23 09:49:37 +01:00
base.rb DEV: Enable some minor rubocop rules (#40094) 2026-05-19 15:29:38 +02:00
contract_base.rb
nested_contract_type.rb
options_base.rb
policy_base.rb DEV: Extract step classes from Service::Base into individual files (#37956) 2026-02-23 09:49:37 +01:00
runner.rb DEV: Fill defaulted keyword arguments in service runner blocks (#42264) 2026-08-03 17:31:37 +02:00
steps_inspector.rb DEV: Add each step to service framework for collection iteration (#38759) 2026-04-03 09:44:03 +02:00