Skip to content

Add optional operations/sidekiq async execution integration - #60

Merged
pyromaniac merged 4 commits into
mainfrom
sidekiq-additions
Jul 24, 2026
Merged

Add optional operations/sidekiq async execution integration#60
pyromaniac merged 4 commits into
mainfrom
sidekiq-additions

Conversation

@Azdaroth

Copy link
Copy Markdown
Member

@pyromaniac too much copy & paste from Core into other apps when adapting operations, let's put it all into the gem

Extract the Sidekiq machinery for running operations asynchronously into the gem itself:
Operations::Sidekiq::Convenience/Command/Job/Serializer/ Deserializer plus the operation_container helper. The integration is an opt-in require ("operations/sidekiq"), the Job is Sentry-free with an overridable #instrument hook, and sidekiq/globalid/money are dev-only dependencies. Adds self-contained specs and README/CHANGELOG docs.

Extract the Sidekiq machinery for running operations asynchronously into
the gem itself: Operations::Sidekiq::Convenience/Command/Job/Serializer/
Deserializer plus the operation_container helper. The integration is an
opt-in require ("operations/sidekiq"), the Job is Sentry-free with an
overridable #instrument hook, and sidekiq/globalid/money are dev-only
dependencies. Adds self-contained specs and README/CHANGELOG docs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Azdaroth
Azdaroth requested a review from pyromaniac July 24, 2026 10:03
@Azdaroth Azdaroth self-assigned this Jul 24, 2026
The optional operations/sidekiq integration pulls a modern Sidekiq that
needs Ruby 3.2+, so specs were red on the sub-3.2 CI rows. Bump
required_ruby_version to >= 3.2, drop the Ruby < 3.2 / Rails < 7.1 rows
from the CI matrix and Appraisals (keep 3.2/7.1, 3.3/7.2, 3.4/8.0), run
the rubocop job on Ruby 3.2, and remove the now-unused appraisal gemfiles.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pyromaniac

Copy link
Copy Markdown
Contributor

@Azdaroth great idea. Can you please fix Rubo?

The gem now requires Ruby >= 3.2, but .rubocop.yml still targeted 2.7,
tripping Gemspec/RequiredRubyVersion. Bumping TargetRubyVersion to 3.2
enables the Ruby 3 idiom cops and, together with rubocop/bookingsync-rubocop
version drift since the todo was last generated, surfaced pre-existing
offenses across the existing lib/spec files (main was already red).

Regenerate .rubocop_todo.yml (the repo's own --auto-gen-config mechanism)
to re-absorb that pre-existing debt. The new operations/sidekiq code is
clean and appears nowhere in the todo.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Azdaroth

Copy link
Copy Markdown
Member Author

@pyromaniac done

Follow-up to the previous commit, which absorbed the offenses surfaced by
the TargetRubyVersion 3.2 bump into .rubocop_todo.yml. Fix them for real
instead:

- Style/ArgumentsForwarding + Naming/BlockForwarding: adopt anonymous
  forwarding (..., *, **, &) across command/convenience/form/etc.
- Style/HashAsLastArrayItem, Layout/EmptyLinesAfterModuleInclusion in specs.
- Style/RedundantFreeze on the frozen regexp literal; Style/ArrayIntersect
  -> Array#intersect? in Result#errors_with_code?.
- Naming/PredicatePrefix: update the stale inline-disable cop name
  (Naming/PredicateName was renamed) for the intentional has_attribute?.
- Lint/DuplicateMethods: scoped inline-disable for two distinct anonymous
  Class.new blocks in preconditions_spec (rubocop can't tell them apart).
- Gemspec/AttributeAssignment: consolidate spec.metadata into a single hash.
  This also fixes a latent bug: the trailing `spec.metadata = {...}` was
  reassigning the whole hash and clobbering homepage_uri/source_code_uri/
  changelog_uri set just above.

Remaining .rubocop_todo.yml entries are pre-existing Metrics thresholds and
the gemspec dev-dependency convention — the same debt already deferred on
main (now a strict subset; RSpec/VerifiedDoubles is gone). Refactoring the
gem's core methods for those metrics is out of scope here. 334 specs green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pyromaniac
pyromaniac merged commit 05917f6 into main Jul 24, 2026
4 checks passed
@pyromaniac
pyromaniac deleted the sidekiq-additions branch July 24, 2026 11:30
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.

2 participants