Repository navigation
Apply labels when creating Dataflow jobs for Ingestion - #899
Closed
davidheryanto wants to merge 1 commit into
Closed
davidheryanto wants to merge 1 commit into
davidheryanto wants to merge 1 commit into
Conversation
The job labels are derived from the labels of the FeatureSets that the job is expected to process when the Dataflow job is created. When the Dataflow job is processing multiple FeatureSets and there are 2 FeatureSets with the same label key but different label value, the resulting label value for the job will be the concatentation of each label value from the FeatureSets.
Collaborator
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: davidheryanto The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
pyalex
reviewed
Jul 28, 2020
pyalex
reviewed
Jul 28, 2020
| pipelineOptions.setUpdate(update); | ||
| pipelineOptions.setRunner(DataflowRunner.class); | ||
| pipelineOptions.setJobName(jobName); | ||
| pipelineOptions.setLabels(labels); |
Collaborator
There was a problem hiding this comment.
Cmiiw, but this overwrites all labels that could be set in application properties. Shouldn't we extend them instead?
Collaborator
Author
There was a problem hiding this comment.
Yes I think we should extend them. Thanks for checking
Collaborator
Author
|
Closing because there is going to be change in job lifecycle in #903 |
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 this PR does / why we need it:
This PR sets the
labeloptions for Dataflow jobs created whenFeatureSetsare applied. The labels are useful for organizing Dataflow jobs and breaking down costs for Dataflow jobs in Google Cloud.The labels for the Dataflow jobs are derived from the
FeatureSetsthe Dataflow job is expected to process when the Dataflow job is created/updated. This means that new FeatureSets that the Dataflow job processes after it was first created (Dataflow job listens to the message broker for new FeatureSets after it is created) will not be considered in the labels unless the Dataflow job is restarted. (This is mainly due to the limitation in Dataflow jobs API in Google that only allows the setting of labels at jobs creation/update time)When a Dataflow job is processing 2 FeatureSets with the same label key but different label value, the resulting label value for the Dataflow job will be the concatenation of the label value from both FeatureSets. The label keys and values to be applied to the Dataflow jobs will be validated so it can meet the requirement for Dataflow job labels https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements. If it does not meet the requirement, those labels will be ignored, so that the Dataflow job creation can still proceed. (This is because labels are good to have but should not cause disruption in job creation)
Which issue(s) this PR fixes:
None
Does this PR introduce a user-facing change?:
None