Skip to content

Allow use of dry-types 1.4.0 #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 4, 2020

Conversation

drewhoskins-stripe
Copy link
Contributor

Summary

It was convenient for us to use dry-types v1.4.0 .
It seems to have caused us to start enforcing stricter typing between symbols and strings, at least for hash keys.

E, [2020-11-04T11:10:50.686328 #69212] ERROR -- temporal_client: Workflow task for LocalHelloWorldWorkflow failed with: #<TypeError: wrong argument type Symbol (expected String)>
D, [2020-11-04T11:10:50.686395 #69212] DEBUG -- temporal_client: /Users/drewhoskins/stripe/temporal-ruby/lib/temporal/workflow/serializer/record_marker.rb:12:in `initialize'

Test Plan

Set up a Docker with temporal_server on my localhost (see instructions https://docs.temporal.io/docs/install-temporal-server/)

cd examples
bundle install
./bin/worker
./bin/trigger LocalHelloWorldWorkflow
./bin/trigger ParentWorkflow
./bin/trigger TripBookingWorkflow 7

This last one looks like an error is expected:

Saga execution aborted: #<Trip::MakePaymentActivity::InsufficientFunds: Unable to charge 183.2>

@drewhoskins-stripe
Copy link
Contributor Author

(will resolve conflicts)

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.

The change looks good, thank you Drew 👍

One note: the dry-* dependencies were removed from cadence-ruby after forking this gem out — https://github.com/coinbase/cadence-ruby/pull/12/files. I think it makes sense to do this here as well, since it's not a hard requirement but is only needed if you want to type your activity/workflow inputs

@drewhoskins-stripe
Copy link
Contributor Author

Nice, that'd be a welcome change from our perspective as well. I'll see if I have time to tackle that.

@antstorm
Copy link
Contributor

antstorm commented Nov 4, 2020

@drewhoskins-stripe I've got some time, so will merge this and remove the dependency. Thanks a lot for contributing 👍

@antstorm antstorm merged commit 3761e32 into coinbase:master Nov 4, 2020
@drewhoskins-stripe drewhoskins-stripe deleted the drewhoskins_proto branch January 26, 2021 18:45
christopherb-stripe pushed a commit to christopherb-stripe/temporal-ruby that referenced this pull request Jan 19, 2022
…ins_serialization_fix

Fix serialization of retry policy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants