-
Notifications
You must be signed in to change notification settings - Fork 751
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
[GOBBLIN-2190] Implement ActivityConfigurationStrategy for Temporal Activities #4093
base: master
Are you sure you want to change the base?
[GOBBLIN-2190] Implement ActivityConfigurationStrategy for Temporal Activities #4093
Conversation
|
||
|
||
/** | ||
* Interface for defining timeout strategies for different Temporal activities. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[NIT] timeout strategies -> "activity configuration strategies"
|
||
/** | ||
* Interface for defining timeout strategies for different Temporal activities. | ||
* Each strategy provides a method to retrieve the timeout duration based on the provided properties. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change as per scope of new class to something like -> "Each strategy provides a method to retrieve configuration details, such as timeout duration, based on the provided properties."
...oral/src/main/java/org/apache/gobblin/temporal/ddm/workflow/impl/CommitStepWorkflowImpl.java
Show resolved
Hide resolved
.../org/apache/gobblin/temporal/ddm/workflow/impl/NestingExecOfProcessWorkUnitWorkflowImpl.java
Show resolved
Hide resolved
.../org/apache/gobblin/temporal/ddm/workflow/impl/NestingExecOfProcessWorkUnitWorkflowImpl.java
Show resolved
Hide resolved
private static Duration getStartToCloseTimeout(ActivityType activityType, Properties props) { | ||
ActivityConfigurationStrategy activityConfigurationStrategy = activityConfigurationStrategies.get(activityType); | ||
if (activityConfigurationStrategy == null) { | ||
return ActivityConfigurationStrategy.defaultStartToCloseTimeout; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add log to track this scenario
...obblin/temporal/loadgen/workflow/impl/NestingExecOfIllustrationItemActivityWorkflowImpl.java
Show resolved
Hide resolved
|
||
@Override | ||
protected Promise<Integer> launchAsyncActivity(final WorkUnitClaimCheck wu) { | ||
return Async.function(activityStub::processWorkUnit, wu); | ||
protected Promise<Integer> launchAsyncActivity(final WorkUnitClaimCheck wu, final Properties props) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we plan to add unit tests for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit tests for older temporal classes needs to be done separately as it will required dedicated effort for this which is beyond the scope of this PR
Dear Gobblin maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
JIRA
Description
Implemented ActivityConfigurationStrategy
Created ActivityType Enum
Refactored the interfaces to pass properties
Tests
ActivityConfigurationStrategyTest
TemporalActivityUtilsTest
Commits