-
Notifications
You must be signed in to change notification settings - Fork 354
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
2478: JobTracker tracks all operations not just jobs #3330
2478: JobTracker tracks all operations not just jobs #3330
Conversation
93a3a3d
to
906e3fa
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3330 +/- ##
==========================================
Coverage 68.01% 68.01%
Complexity 2596 2596
==========================================
Files 955 955
Lines 30564 30559 -5
Branches 3376 3376
==========================================
- Hits 20787 20784 -3
+ Misses 8302 8300 -2
Partials 1475 1475 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Can you fix the code smell? |
store.initialise("graphId", createSchemaMock(), storeProperties); | ||
|
||
// When | ||
store.execute(addElements, context); |
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.
This test is worth keeping as it tests job functionality
We no longer handle jobs in the execute
method, but we do in the executeJob
method.
Swapping this line should pass the test
0cc7bef
to
f85d483
Compare
@@ -106,24 +106,6 @@ public void shouldPropagateStatusInformationContainedInOperationExceptionsThrown | |||
assertEquals(SERVICE_UNAVAILABLE.getStatusCode(), response.getStatus()); | |||
} | |||
|
|||
@Test | |||
public void shouldReturnSameJobIdInHeaderAsGetAllJobDetailsOperation() throws IOException { |
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.
Agree that this test can be deleted now as it fails due to no jobs running which is correct.
However, I'm not a fan of just deleting tests with no explanation. It's better to change the test to document the new behavior as a bit of self documenting code. I think we need a new test here to show that we shouldn't get a job-id header returned anymore for the executeOperation endpoint as it doesn't make sense.
However, we are still getting the header returned so you will need to implement this
Quality Gate passedIssues Measures |
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.
Can we stop the execute endpoint from returning a job-id header as it no longer makes sense to return one?
Changes Made:
Removed addOrUpdateJobDetail from the execute method.
Non-job operations will no longer be tracked, preventing unnecessary performance degradation and cache pollution.
Removed test for checking if operation runs when jobtracker cache is broken.