Skip to content

Conversation

@nagl-stripe
Copy link
Contributor

This PR adds support for signal_with_start_workflow_execution. It is a rework of #99 based on Anthony's feedback.

New tests:

bundle exec rspec spec/unit/lib/temporal_spec.rb
bundle exec rspec spec/unit/lib/temporal/client_spec.rb
bundle exec rspec spec/unit/lib/temporal/grpc_client_spec.rb
cd examples && bundle exec rspec spec/integration/signal_with_start_spec.rb

Copy link
Contributor

@antstorm antstorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thank you for addressing all the comments!

One small thing before we merge this — can we make signal_name and signal_input to be part of the options that are passed to start_workflow rather than top-level arguments? This makes it easier to distinguish workflow-specific arguments from SDK-specific options

@nagl-stripe nagl-stripe requested a review from antstorm November 4, 2021 00:51
# signals aren't supported at all, so let's prohibit start_workflow calls that try to signal
signal_name = options.delete(:signal_name)
signal_input = options.delete(:signal_input)
raise NotImplementedError, 'Signals are not available when Temporal::Testing.local! is on' unless signal_name.nil? && signal_input.nil?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: inverted condition would probably read much better here — if signal_name || signal_input

@config = config
end

# Starts a workflow with an optional signal.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please merge this with the master branch? I've added YARD-style documentation that should give you some structure for your comments

@nagl-stripe nagl-stripe requested a review from antstorm November 8, 2021 17:18
Copy link
Contributor

@antstorm antstorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brilliant, thank you for your contribution! 🙌

@antstorm antstorm merged commit 9a581ce into coinbase:master Nov 9, 2021
@antstorm antstorm added the sync pending Needs to be ported to cadence-ruby label Nov 12, 2021
gvieira pushed a commit to clearbit/temporal-ruby that referenced this pull request Dec 21, 2021
* Pass config to the error handler instead of using the global config

* Fix example tests

* Make the config property in the workflow context publicly readable

* [Fix] Retryer GRPC error lookup (coinbase#109)

* Fix issue with GRPC error lookup in Retryer

* Rename spec file for retryer to contain _spec

* [Feature] Add id and domain to workflow context's metadata (coinbase#110)

* Start syncing id and domain on workflow context metadata

* Fixed tests

Co-authored-by: DeRauk Gibble <derauk.gibble@coinbase.com>

* Explicit docker-compose project name (coinbase#114)

* Add YARD documentation for Temporal::Client (coinbase#113)

* Add YARD documentation for Temporal::Client

* Add yard gem

* Fix @option tag

* Typo fix

* Add signal arguments to start_workflow (support for signal_with_start) (coinbase#112)

* Add signal arguments to start_workflow (to support signal_with_start)

* Move signal arguments to the options hash

* PR feedback

* Fix merge error

* Extend #wait_for to take multiple futures and a condition block (coinbase#111)

* Differentiate TARGET_WILDCARD and WILDCARD, allow comparison with EventTarget objects (coinbase#118)

* Turn off schedule_to_start activity timeout by default (coinbase#119)

* Separate options from keyword args in #start_workflow (coinbase#117)

* Separate options from keyword args in #start_workflow

* fixup! Separate options from keyword args in #start_workflow

* Surface additional workflow metadata on workflow context (coinbase#120)

* Refactor metadata generation

* Make task queue available on workflow metadata, add example test

* Expose workflow start time metadata

* Add memos (coinbase#121)

* Add describe_namespace (coinbase#122)

* Add describe_namespace

* Feedback

* Improve header serialization and propagation (coinbase#124)

* [Fix] Non-started activity cancellation (coinbase#125)

* Fix event target map entry for ACTIVITY_CANCELED event

* Fix cancellation of a non-started activity

* fixup! Fix event target map entry for ACTIVITY_CANCELED event

Co-authored-by: DeRauk Gibble <derauk.gibble@coinbase.com>
Co-authored-by: DeRauk Gibble <derauk@gmail.com>
Co-authored-by: Anthony Dmitriyev <antstorm@gmail.com>
Co-authored-by: nagl-stripe <86737162+nagl-stripe@users.noreply.github.com>
Co-authored-by: jeffschoner-stripe <63118764+jeffschoner-stripe@users.noreply.github.com>
Co-authored-by: Drew Hoskins <37816070+drewhoskins-stripe@users.noreply.github.com>
christopherb-stripe pushed a commit to christopherb-stripe/temporal-ruby that referenced this pull request Jan 9, 2023
…kins_dynamic_activities_stripe

dynamic Activity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sync pending Needs to be ported to cadence-ruby

Development

Successfully merging this pull request may close these issues.

2 participants