Repository navigation
Conversation
Stream reads that span many pages need a method that no single operation implements. A helper method binds no operation, can take a callable of the caller, and only Python makes it.
Client and Workflow code get the same typed reads that stop on a predicate. The support package gets test doubles, so the tests check what each method passes to its helper.
Authors need the directive, its function arguments and the rule for records that only helper methods reach. The architecture note covers the backing check that skips those records. Co-authored-by: Tim Conley <timothy.conley@temporal.io>
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
@nexus.helper, which lets a helper of the support package implement a resource method.@nexus.function, and the function stays in the process. A signature function is no longer an operation.targetslimits a helper method to one target. Only Python takes a helper, and the other languages leave the method out.takeandfilteron bothStreamclasses.Why?
The Stream API needs methods that are not one wire operation. A
takereads many pages in one call and stops at a predicate of the caller. The SDK's support package does that work, and nexgen couldn't generate a method for it.How did you test it?
cargo validatepasses. The stream tests check that eachStreamhas the methods, that each passes its arguments to its helper, and that a typed use type-checks. A fixture checks the error for@nexus.helpertogether with@nexus.operation.Link to a test plan if any -