Skip to content
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

Merge upstream from coinbase's branch #8

Open
wants to merge 129 commits into
base: master
Choose a base branch
from

Conversation

emmmbrown
Copy link
Member

@emmmbrown emmmbrown commented Feb 21, 2024

All of our apps reference specific branches or commits, so updating this doesn't change anything immediately

DeRauk and others added 30 commits October 5, 2021 12:34
Pass a config to the error handler instead of using Temporal.configuration
* Fix issue with GRPC error lookup in Retryer

* Rename spec file for retryer to contain _spec
* Start syncing id and domain on workflow context metadata

* Fixed tests

Co-authored-by: DeRauk Gibble <[email protected]>
* Add YARD documentation for Temporal::Client

* Add yard gem

* Fix @option tag

* Typo fix
#112)

* Add signal arguments to start_workflow (to support signal_with_start)

* Move signal arguments to the options hash

* PR feedback

* Fix merge error
* Separate options from keyword args in #start_workflow

* fixup! Separate options from keyword args in #start_workflow
* Refactor metadata generation

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

* Expose workflow start time metadata
* Add describe_namespace

* Feedback
* 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
…129)

It can take some time between registering a namespace, and that
namespace being available to describe. Moreover, the test as originally
written can depend on the behavior of a previous run. The description
passed on initial namespace registration will remain on the namespace
indefinitely. If this value is changed in code, subsequent tests
will fail when the description does not match.

Using ruby-samples (or whatever name has been overridden in an
environment variable) ensures the same behavior each run and is not
subject to the possible delay of creating a new namespace since
this namespace must already exist to be able to start the test
workers.
- removed metacharacters from the shell commands so they can be
copy/pasted directly

- added require 'temporal-ruby' for each example that needs it

- made it clear that the worker and workflow both need access to
the same configuration step, so it should be its own file

- made it clear the worker and workflow files need to be executed
in their own terminals/shells
Modify the Getting Started section so that it works
…-namespace-public

Add namespace to emitted metrics
…kflow-tag-metric

Add workflow tag to metrics emitted from the activity task processor
* initial work to support SignalExternalWorkflow

* define the serializer and hook it up

* stub in what I think is the correct work for each event type

* some fixes per antstorm advice

* initial attempt at integration test

* docs on testing and an improvement to existing test

* encode the signal payload using correct helper

* return a Future and fulfill it correctly upon completion

* get the \*event_id from the right field in the command structure

* modify test to verify the signal is only received once

* test for failure to deliver a signal to external workflow

* do not discard the failure command otherwise non-deterministic

* simplify test workflow by eliminating unnecessary timer

* oops, had double call to #schedule_command so signals were sent twice

* edit description of example

* split to separate files and improve test coverage

* change method signature for consistency and a few other cleanups

* oops, fix EventType name to match correct constant
cj-cb and others added 15 commits July 17, 2023 09:08
Co-authored-by: cj-cb <cj-cb>
* Correct uspert -> upsert

* Signals first ordering w/ config, flags

* Tests and fabricators

* rubyfmt substantially modified files

* Integration test for signal fix

* Check for supported server version for signals first ordering

* Add safe rollout instructions to change log

* Clean up styling

* Factor out flags used function in state manager

* Refactor capabilities for lazy loading

* Refactor how HANDLE_SIGNALS_FIRST SDK flag is managed

* Require set
* Check that run timeout matches

* Set run timeout
* Track history size

* Add example integration test for continuing as new
* Save signals on first workflow task

* Save signals on first workflow task

* Config option for preserving no signals in the first task

* Update version and CHANGELOG

* Remove redundant sdk flags
* Guard nil context

* Set abort_on_exception for thread pool threads

* Logging and handling of errors in thread top level

* Set abort_on_exception in poller threads

* New thread pool tests for error cases

* Clean up/fix related tests

---------

Co-authored-by: Jeff Schoner <[email protected]>
* Expose count_workflow_executions on the temporal client

* Return a wrapped type for count_workflows response

* Add integration tests

* Remove debug log lines

* Update lib/temporal/client.rb

Fix a typo with the new return type.

Co-authored-by: jazev-stripe <[email protected]>

* Return the count value of count_workflow_executions instead of wrapping it

* Remove the example integration spec for count_workflows. ES isn't setup in github actions and while this test is nice to have, it isn't critical to have an integration spec for it because it relies on timing due to the async visibility store

---------

Co-authored-by: jazev-stripe <[email protected]>
* Add schedule model classes

These are meant to be the interface that users will have to use - I
tried to copy as much useful documentation from the temporal grpc api as
I could

* Add serializers to convert model objects to proto

* Add create, describe and list schedules

* Delete and update schedule

* Trigger and pause schedule

* Add methods and Schedule module to Temporal obj

* Remove unrelated spec

Co-authored-by: Jeff Schoner <[email protected]>

---------

Co-authored-by: Jeff Schoner <[email protected]>
* Remove cancelation commands when underlying futures are closed

* Fix spec for timer command preservation

* Remove potentially flaky example spec
Convert keyword argument into hashes in order to fulfill Temporal::Metrics API contract obligations.

Fixes: #90

Signed-off-by: Progyan Bhattacharya <[email protected]>
* Add base64 to gemspec for Ruby 3.4.0

* Fix not to raise expectations to stop warning
* Allow passing channel args to GRPC connection

* Add config.connection_options hash

* Add option for client grpc connection retries

* Allow passing custom gRPC retry policy
@emmmbrown emmmbrown requested a review from gvieira February 21, 2024 21:14
DeRauk and others added 14 commits March 5, 2024 16:27
* Testing build with readme change

* Sleep longer

* Pin Temporal to version 1.22

* Remove test changes

* Nit
)

* Bump `dry-types`/`dry-struct` example versions

The current versions in the examples are pretty old.

* Use `Dry::Struct` instead of `Dry::Struct::Value`

The gem is warning that `Dry::Struct::Value` is finally going to be
removed.

```
[dry-struct] Dry::Struct::Value is deprecated and will be removed in the next major version
/Users/sal/Development/temporal-ruby/lib/temporal/concerns/typed.rb:35:in `generate_struct'
```
Raise NotImplementedError instead of NoMethodError for clarify.
* Specialize workflow event targets

* Methods for downloading histories

* Replay tester

* Basic replay tester unit tests

* Add example replay test with history file

* Add workflow stack trace to replay error

* Dynamically load replay state in workflow logger

* Log when replaying in replay tests

* Use binpb extension for protobuf biniaries

* Better comments about logging during replay

* Simplify file -> bytes read calls

* Fix comment typos

* More ergonomic replaying callback

* Improve ReplayTesterError, rubyfmt spec

* Remove extra commands check

* Don't default to logging in replay tests

* Check history starts correctly

* Remove correct_event_types

* Refactor to more composable API

* Use real namespace from configuration

* rubyfmt

* Fix test name typo
* Add pagination to get_workflow_history

* Fix CI
…Apple Silicon machines (#310)

* relax the version requirement for 'google-protobuf' to allow using newer 'grpc' gem

* use major.minor to have min minor version requirement
* support passing activity task rate limit on worker options

* remove extra space in README
* Implement ConverterWrapper as a replacement for Concern::Payloads

* Wrap concerter & payload codec with ConverterWrapper in Configuration

* Use ConverterWrapper in Connection::GRPC

* Fix failing specs

* Remove Concerns::Payload from worker and client

* Remove Concerns::Payloads dependency from all the serializers

* Remove Concerns::Payloads from Metadata

* fixup! Remove Concerns::Payloads dependency from all the serializers

* Remove Concerns::Payloads from Errors

* Remove Concerns::Payloads from Executions

* Remove Concerns::Payloads from fabricators

* Remove Concerns::Payloads
* Remove global config from client specs

* Remove global configuration from client and connection

* Remove global configuration from integration specs

* Remove global config from error messages and comments

* Remove global config from specs

* Remove global config from worker spec

* Add README section on global vs local configuration
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.