Repository navigation
Conversation
…amples The examples and their lanes mark Redis as the default plugin, since S119 asks for exactly one default when a client has more than one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
This PR adds the three Jetty v2 examples to
tests/contrib/streams/examples/and lists them in the examples README.two_backends.py: one Worker withRedisStreamPluginandNativeStreamPlugin, a Workflow with an audit Stream on Redis and a live Stream on native, and one Activity that writes to both.workflow_reader.py: a follower Workflow reads an agent Workflow's Stream withsubscribe, until the Stream closes with the agent's result.migrate_redis_to_native.py: step 1 runs the old code on Redis only. Step 2 deploys new code on a Worker with both plugins, which picksnativebehindworkflow.patched, so a chat that started on Redis goes on there, and a new chat goes to the server.test_examples.pyruns each one on three lanes. The memory and Redis lanes useMemoryStreamPlugin(name="native")in place of the server, with no change to Workflow code. The native lane usesNativeStreamPluginand runs only whenTEMPORAL_STREAMS_NATIVE_TARGETnames a server with the Stream service.Why?
The examples show that the Brook v4 API extends to Workflow reads, the native backend, and two backends in one Worker with additions only, and they are the review material for Jetty v2.
How did you test it?
pytest tests/contrib/streamspasses, with the examples on the memory and Redis lanes. The native lane passes against jt-srv's t5 dev server.poe lintpasses.