Skip to content

Add WorkflowImplementationOptions.setLocalActivityOptions (#975) #1001

New issue

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

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

Already on GitHub? # to your account

Merged
merged 2 commits into from
Jan 25, 2022

Conversation

imalao
Copy link
Contributor

@imalao imalao commented Jan 24, 2022

What was changed

Added localActivityOptions and defaultLocalActivityOptions fields and relevant setters/getters to WorkflowImplementationOptions, SyncWorkflowContext, and Workflow, so that in Workflow.newLocalActivityStub, any local activity options received from the workflow are merged with options in WorkflowImplementationOptions.

Why?

Following existing WorkflowImplementationOptions.setActivityOptions, allow user to define local activity options for different types of activities instead of defining them in workflow code. This would be applied to Workflow.newLocalActivityStub.

Checklist

  1. Closes Issue #975

  2. How was this tested:
    Duplicated existing tests for merging regular Activity Options for merging Local Activity Options. DefaultActivityOptionsOnWorkflowNotSetTest.testDefaultLocalActivityOptionsNotSetTest is disabled for now as discussed with @Spikhalskiy

  3. Any docs updates needed?

Don't see any existing docs on WorkflowImplementationOptions on docs.temporal.io

…#975)

Following existing WorkflowImplementationOptions.setActivityOptions, allow user
to define local activity options for different types of activities instead of
defining them in workflow code.
@CLAassistant
Copy link

CLAassistant commented Jan 24, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@Spikhalskiy Spikhalskiy left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution, Ivy. Great job!
There is a couple of style fixes that I will address in a follow-up PR, because they are mostly carry-overs from the existing code.

@Spikhalskiy Spikhalskiy merged commit ead55bd into temporalio:master Jan 25, 2022
Spikhalskiy added a commit to Spikhalskiy/java-sdk that referenced this pull request Jan 25, 2022
Provide javadocs
Make sure collections that are exposed by Options are immutable to avoid unintended modifications
@Spikhalskiy Spikhalskiy mentioned this pull request Jan 25, 2022
Spikhalskiy added a commit to Spikhalskiy/java-sdk that referenced this pull request Jan 25, 2022
Provide javadocs
Make sure collections that are exposed by Options are immutable to avoid unintended modifications
Spikhalskiy pushed a commit that referenced this pull request Jan 25, 2022
Provide javadocs
Make sure collections that are exposed by Options are immutable to avoid unintended modifications

* Apply suggestions from code review

Co-authored-by: Spencer Judge <sjudge@hey.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide WorkflowImplementationOptions.setLocalActivityOptions
3 participants