Skip to content
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

Conversation

sarahwada-stripe
Copy link
Collaborator

@sarahwada-stripe sarahwada-stripe commented Jul 10, 2024

Context

Expose jobVersion, jobJarUrl as part of RuntimeTask interface.

This allows us to add version and sha labels to our job metrics. We'd like these metric labels so we can monitor our automated job deploys.

Checklist

  • ./gradlew build compiles code correctly
  • Added new tests where applicable
  • ./gradlew test passes all tests
  • Extended README or added javadocs where applicable

Copy link

github-actions bot commented Jul 10, 2024

Test Results

535 tests  ±0   529 ✅ ±0   7m 53s ⏱️ -1s
139 suites ±0     6 💤 ±0 
139 files   ±0     0 ❌ ±0 

Results for commit 7a5a08a. ± Comparison against base commit 3431246.

♻️ This comment has been updated with latest results.

@@ -33,4 +33,9 @@ void initialize(
UserCodeClassLoader userCodeClassLoader);

String getWorkerId();

Copy link
Collaborator

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.

Copy link
Collaborator Author

@sarahwada-stripe sarahwada-stripe Jul 11, 2024

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!

can you elaborate on why it's on the runtimeTask for metrics instead of using regular metrics collector tagging?

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:

.

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.

Copy link
Collaborator

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).

Copy link
Collaborator Author

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 the ExecuteStageRequest? I think we'll need it to capture the jobVersion on the worker

Copy link
Collaborator

@Andyz26 Andyz26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment above.

@sarahwada-stripe sarahwada-stripe force-pushed the swada--runtime-task-expose-version branch from 39b131f to eb10be1 Compare July 16, 2024 23:16
@@ -239,4 +239,5 @@ protected Observable<Status> getStatus() {
public String getWorkerId() {
return executeStageRequest.getWorkerId().getId();
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: remove blank line

@sarahwada-stripe sarahwada-stripe merged commit c0d0370 into Netflix:master Jul 17, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants