-
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 ActivityType & add HeartBeat for Temporal Activities #4093
base: master
Are you sure you want to change the base?
[GOBBLIN-2190] Implement ActivityType & add HeartBeat for Temporal Activities #4093
Conversation
...al/src/main/java/org/apache/gobblin/temporal/ddm/activity/ActivityConfigurationStrategy.java
Outdated
Show resolved
Hide resolved
...al/src/main/java/org/apache/gobblin/temporal/ddm/activity/ActivityConfigurationStrategy.java
Outdated
Show resolved
Hide resolved
...oral/src/main/java/org/apache/gobblin/temporal/ddm/workflow/impl/CommitStepWorkflowImpl.java
Outdated
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
Outdated
Show resolved
Hide resolved
gobblin-temporal/src/main/java/org/apache/gobblin/temporal/ddm/util/TemporalActivityUtils.java
Outdated
Show resolved
Hide resolved
...obblin/temporal/loadgen/workflow/impl/NestingExecOfIllustrationItemActivityWorkflowImpl.java
Outdated
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
...rc/main/java/org/apache/gobblin/temporal/ddm/workflow/impl/ProcessWorkUnitsWorkflowImpl.java
Show resolved
Hide resolved
.../java/org/apache/gobblin/temporal/util/nesting/workflow/AbstractNestingExecWorkflowImpl.java
Show resolved
Hide resolved
As discussed offline, please add the testing details |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4093 +/- ##
=============================================
- Coverage 49.03% 38.75% -10.29%
+ Complexity 10008 1599 -8409
=============================================
Files 1895 388 -1507
Lines 73612 16016 -57596
Branches 8188 1588 -6600
=============================================
- Hits 36097 6207 -29890
+ Misses 34280 9311 -24969
+ Partials 3235 498 -2737 ☔ View full report in Codecov by Sentry. |
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.
Copilot reviewed 5 out of 19 changed files in this pull request and generated 1 comment.
Files not reviewed (14)
- gobblin-temporal/src/main/java/org/apache/gobblin/temporal/ddm/workflow/impl/ProcessWorkUnitsWorkflowImpl.java: Evaluated as low risk
- gobblin-temporal/src/main/java/org/apache/gobblin/temporal/ddm/workflow/impl/ExecuteGobblinWorkflowImpl.java: Evaluated as low risk
- gobblin-temporal/src/main/java/org/apache/gobblin/temporal/ddm/launcher/ProcessWorkUnitsJobLauncher.java: Evaluated as low risk
- gobblin-temporal/src/main/java/org/apache/gobblin/temporal/ddm/workflow/impl/NestingExecOfProcessWorkUnitWorkflowImpl.java: Evaluated as low risk
- gobblin-temporal/src/main/java/org/apache/gobblin/temporal/ddm/work/WUProcessingSpec.java: Evaluated as low risk
- gobblin-temporal/src/main/java/org/apache/gobblin/temporal/ddm/workflow/impl/CommitStepWorkflowImpl.java: Evaluated as low risk
- gobblin-temporal/src/main/java/org/apache/gobblin/temporal/ddm/workflow/CommitStepWorkflow.java: Evaluated as low risk
- gobblin-temporal/src/main/java/org/apache/gobblin/temporal/util/nesting/workflow/NestingExecWorkflow.java: Evaluated as low risk
- gobblin-temporal/src/main/java/org/apache/gobblin/temporal/util/nesting/workflow/AbstractNestingExecWorkflowImpl.java: Evaluated as low risk
- gobblin-temporal/src/main/java/org/apache/gobblin/temporal/ddm/workflow/ProcessWorkUnitsWorkflow.java: Evaluated as low risk
- gobblin-temporal/src/main/java/org/apache/gobblin/temporal/loadgen/workflow/impl/NestingExecOfIllustrationItemActivityWorkflowImpl.java: Evaluated as low risk
- gobblin-temporal/src/main/java/org/apache/gobblin/temporal/loadgen/launcher/GenArbitraryLoadJobLauncher.java: Evaluated as low risk
- gobblin-temporal/src/main/java/org/apache/gobblin/temporal/GobblinTemporalConfigurationKeys.java: Evaluated as low risk
- gobblin-temporal/src/main/java/org/apache/gobblin/temporal/ddm/activity/ActivityConfigurationStrategy.java: Evaluated as low risk
Comments suppressed due to low confidence (3)
gobblin-temporal/src/test/java/org/apache/gobblin/temporal/ddm/util/TemporalActivityUtilsTest.java:39
- Mocking ActivityType is unnecessary and might lead to misleading test results. Use a real ActivityType value instead.
ActivityType activityType = Mockito.mock(ActivityType.class);
gobblin-temporal/src/main/java/org/apache/gobblin/temporal/ddm/util/TemporalActivityUtils.java:49
- Add validation to ensure that every ActivityType has a corresponding strategy to prevent runtime errors.
private static final Map<ActivityType, ActivityConfigurationStrategy> activityConfigurationStrategies = new HashMap<>();
gobblin-temporal/src/main/java/org/apache/gobblin/temporal/ddm/util/TemporalActivityUtils.java:29
- Correct the spelling of 'Temporal' in the comment on line 30.
import lombok.experimental.UtilityClass;
gobblin-temporal/src/main/java/org/apache/gobblin/temporal/ddm/util/TemporalActivityUtils.java
Outdated
Show resolved
Hide resolved
int DEFAULT_GENERATE_WORKUNITS_ACTIVITY_STARTTOCLOSE_TIMEOUT_MINUTES = 120; | ||
int DEFAULT_RECOMMEND_SCALING_ACTIVITY_STARTTOCLOSE_TIMEOUT_MINUTES = 5; | ||
int DEFAULT_DELETE_WORK_DIRS_ACTIVITY_STARTTOCLOSE_TIMEOUT_MINUTES = 10; | ||
int DEFAULT_PROCESS_WORKUNIT_ACTIVITY_STARTTOCLOSE_TIMEOUT_MINUTES = 180; | ||
int DEFAULT_COMMIT_ACTIVITY_STARTTOCLOSE_TIMEOUT_MINUTES = 180; |
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 update the default numbers to a higher value for now till we have better visibility and tuning in place. Also, we already see flows which are running close to these number and timing out those isn't correct eg. GENERATE_WORKUNITS=4h, PROCESS_WORKUNIT=6h, COMMIT=4h
do we know how much max time max takes/can take and what is the factor that increases the time, if no, let's also increase DELETE_WORK_DIRS/ RECOMMEND_SCALING time
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.
I have updated to use a single DEFAULT time for all activity type to simplify the code
public interface ActivityConfigurationStrategy { | ||
/** Default start to close timeout duration for any activity if not specified. */ | ||
Duration defaultStartToCloseTimeout = Duration.ofMinutes(180); | ||
int DEFAULT_GENERATE_WORKUNITS_ACTIVITY_STARTTOCLOSE_TIMEOUT_MINUTES = 120; |
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 have numbers currently, how long can it take for each activity, ideally we want this number to be higher than 100th %ile of all executions that are running and also having scope for what we support(max data copy size - something that we will have as part of our SLAs for users)
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.
Used 360 as default timeout for all activity
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