[GOBBLIN-2241] Attempt partial commit only in case commit policy is partial commit #4157
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.
This pull request introduces an enhancement to how job commit policies are determined and used in the workflow implementation. The main change is the addition of support for retrieving the
JobCommitPolicydirectly from a TypesafeConfigobject, which improves flexibility and integration with configuration-driven workflows. Additionally, the workflow now conditionally attempts a partial commit based on the job's commit policy.Configuration and Commit Policy Integration:
getCommitPolicy(Config config)toJobCommitPolicy, allowing retrieval of commit policy from a TypesafeConfigobject, in addition to the existingPropertiesandState-based methods. [1] [2]ProcessWorkUnitsWorkflowImplto use the newJobCommitPolicy.getCommitPolicy(Config)method, enabling commit policy evaluation directly from workflow configuration. [1] [2]Workflow Commit Logic:
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
This PR introduces change to attempt partial commit only if commit policy is specified in job properties.
This is being added to avoid cases when PostPublishStep runs even in case we have job commit policy as full but partial commit is invoked somehow through SafeDatasetCommit
Tests
NA
Commits