discourse/spec
Alan Guo Xiang Tan 35bc27a36d
FIX: themes:update rake task not rolling back transaction on error (#26750)
This commit fixes a bug in the `themes:update` rake task which resulted
in the ActiveRecord transaction not being rolled back when an error was
encountered. The transaction was first introduced in
7f0682f4f2 which changed a `begin..rescue`
block to `transaction do..rescue`. The problem with that change
prevented the transaction from ever rolling back as the code block
looks something like this:

```
transaction do
  begin
    update_theme
  rescue => e
    # surpress error
  end
end
```

From the transaction's point of view now, it will never rollback even if
an error was encountered when updating the remote theme because it will
never see the error.

Instead we should have done something like this if we wanted to surpress
the errors encountered while still ensuring that the transaction is
rolled back.

```
begin
  transaction do
    update_theme
  end
rescue => e
  # surpress error
end
```
2024-04-25 15:19:23 +08:00
..
fabricators FEATURE: Merge user associated accounts, favouring the target user upon conflict (#26645) 2024-04-16 17:37:33 +08:00
fixtures DEV: Support translations for property labels in objects schema editor (#26362) 2024-03-28 10:53:51 +08:00
generator DEV: Silence the output of migration specs (#26365) 2024-03-26 11:32:44 +01:00
helpers DEV: early hints around_action -> after_action (#26423) 2024-04-04 14:37:44 +01:00
import_export DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
initializers DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
integration Revert "FIX: Post uploads setting access_control_post_id unnecessarily (#26627)" (#26643) 2024-04-16 14:10:25 +10:00
integrity Enable Embroider/Webpack code spliting for Wizard (#24919) 2023-12-20 13:15:06 +00:00
jobs DEV: don't send moderator welcome message to first admin. (#26719) 2024-04-24 00:20:14 +05:30
lib FEATURE: Allow users to sign in using LinkedIn OpenID Connect (#26281) 2024-04-19 18:47:30 +08:00
mailers FIX: Correctly re-attach allowed images in activity summary e-mail (#26642) 2024-04-18 10:27:46 +08:00
migrations DEV: Silence the output of migration specs (#26365) 2024-03-26 11:32:44 +01:00
models FIX: disable storing invalid post and topic timing when sent from client (#26683) 2024-04-19 18:10:50 +10:00
multisite DEV: Add S3 upload system specs using minio (#22975) 2023-08-23 11:18:33 +10:00
requests FIX: Allow deleting avatars from the selectable avatars setting (#26720) 2024-04-24 16:07:12 -04:00
script/import_scripts DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
serializers FIX: Serialize categories for bookmarks (#26606) 2024-04-17 17:23:47 +03:00
services DEV: Add getCategoryIdByName helper function to theme migrations (#26601) 2024-04-22 09:01:53 +08:00
support DEV: Move chat service objects into core (#26506) 2024-04-04 10:57:41 -03:00
system FIX: Improve handling of 'PublicExceptions' when bootstrap_error_pages enabled (#26700) 2024-04-24 09:40:13 +01:00
tasks FIX: themes:update rake task not rolling back transaction on error (#26750) 2024-04-25 15:19:23 +08:00
views FEATURE: Simplify crawler content for non-canonical post URLs (#26324) 2024-03-26 15:18:46 +00:00
rails_helper.rb Revert "DEV: Add pry-stack_explorer plugin gem (#26732)" (#26739) 2024-04-24 13:03:35 +01:00
regenerate_swagger_docs DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
swagger_helper.rb DEV: Bump rswag-specs from 2.11.0 to 2.13.0 (#24654) 2023-12-07 08:16:47 +08:00