-
Notifications
You must be signed in to change notification settings - Fork 200
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
expose jobVersion, jobJarUrl as part of RuntimeTask interface #689
Merged
sarahwada-stripe
merged 4 commits into
Netflix:master
from
sarahwada-stripe:swada--runtime-task-expose-version
Jul 17, 2024
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
285c356
expose jobVersion, jobJarUrl as part of RuntimeTask interface
sarahwada-stripe eb10be1
remove job metadata from RuntimeTask
sarahwada-stripe 1ba6fe4
remove added newline
sarahwada-stripe 7a5a08a
Merge branch 'master' into swada--runtime-task-expose-version
sarahwada-stripe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,4 +33,5 @@ void initialize( | |
UserCodeClassLoader userCodeClassLoader); | ||
|
||
String getWorkerId(); | ||
|
||
} |
This file contains 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
Oops, something went wrong.
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.
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 would prefer we do not add specific metrics/metadata into these entry-interfaces. can you elaborate on why it's on the runtimeTask for metrics instead of using regular metrics collector tagging? I feel like there are existing metrics path to do this without adding into this interface.
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.
@Andyz26 thanks for the review!
The job metadata is only available as part of the job submission, not the actual running job itself. From my understanding, we need to hook into the task/job submission to get information like version. Right now, we have written our own AgentMain class, and we can hook into the TaskExecutor
onTaskStarting
to add custom job labels, like the scaffolding that exists here:mantis/mantis-server/mantis-server-agent/src/main/java/io/mantisrx/server/agent/AgentV2Main.java
Line 59 in c1c7f34
Given the context above, do you have a recommendation for a better place to make this change? Happy to move things around, it's possible I've missed a better metrics path when going through the code.
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.
imo since agent to inner task is not always 1 to 1 it would be more consistent to construct such metrics within the worker runtime where you have access to things like MetricsRegistry (I don't know how your current metrics integration is done into with this one).
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.
got it, thanks for the feedback! are you opposed to adding
jobVersion
to theExecuteStageRequest
? I think we'll need it to capture thejobVersion
on the worker