Skip to content

Conversation

@dhruv-stripe
Copy link
Contributor

Summary

This PR adds support for interacting with the Temporal Schedules Api. We're using this patch internally to synchronize schedules with Temporal when new code is deployed.

The approach I took was to define a set of Temporal::Schedule classes that roughly map to the proto models defined in the temporal api.

This is a large PR given the surface area of the api, but I've tried to break it by commit to make it a bit easier to review.

Test Plan

Ran rspec spec and cd examples && rspec spec without error

Comment on lines 33 to 41
# DO NOT MERGE THIS UPSTREAM TO COINBASE
it 'exemptions' do
data = '{"name":"foo"}'
Temporal::Connection::Converter::Payload::ProtoJSON::SPECIAL_STRIPE_WORKFLOW_PAYLOAD_TYPES.each do |message_type|
fake_payload = Struct.new(:metadata, :data).new({ 'messageType' => message_type }, data)
data_out = subject.from_payload(fake_payload)
expect(data_out).to eq({ 'name' => 'foo' })
end
end
Copy link
Contributor

Choose a reason for hiding this comment

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

@dhruv-stripe These lines from Stripe's fork leaked through in your merge and are causing CI to fail

Co-authored-by: Jeff Schoner <jeffschoner@gmail.com>
@DeRauk DeRauk merged commit 628960b into coinbase:master Jan 4, 2024
@DeRauk
Copy link
Contributor

DeRauk commented Jan 4, 2024

Thank you!

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.

3 participants