-
Notifications
You must be signed in to change notification settings - Fork 4
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
AJ-1602: list-jobs API no longer a passthrough to Import Service #1305
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1305 +/- ##
===========================================
- Coverage 69.34% 69.29% -0.05%
===========================================
Files 97 97
Lines 3399 3407 +8
Branches 373 368 -5
===========================================
+ Hits 2357 2361 +4
- Misses 1042 1046 +4 ☔ View full report in Codecov by Sentry. |
"request as reported by import service")) | ||
else if (importRequest.url.contains("its.lawsuit.time")) Future.successful(RequestComplete | ||
(UnavailableForLegalReasons, "import service message")) | ||
else if (importRequest.url.contains("good")) Future.successful(RequestComplete(Accepted, |
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.
no changes here, just IntelliJ auto-reformatting
} | ||
} | ||
|
||
} |
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 replaces the unit tests from WorkspaceApiServiceSpec, just below
// TODO AJ-1602: merge lists before replying | ||
importServiceJobs | ||
} | ||
|
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 is where, in future PRs, we'll do all the work of aggregating cWDS and Import Service job info
entityServiceConstructor(FlexibleModelSchema).listJobs(workspaceNamespace, workspaceName, runningOnly, userInfo) map { respBody => | ||
RequestComplete(OK, respBody) | ||
} | ||
} |
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 replaces the previous passthrough (i.e. proxy) implementation for listing jobs. Now, we make the REST call, deserialize the results, then reply with those results. This is prep for future PRs, in which we'll need to interpret the results in order to aggregate cWDS and Import Service values.
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.
Cool!
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.
changes seem to make sense, can't review on the scala itself
AJ-1602
The eventual goal is to query both cWDS and Import Service, ask each about their running jobs, and aggregate the results into a single response.
This PR is prep for that. Previously, the call to Import Service was a pure passthrough; Orch was blind to Import Service's results and just passed on the response. Now, in this PR, Orch can deserialize the Import Service results and is fully aware of them. We still pass on the results unchanged, but this is a necessary step for when we'll later need to aggregate results.
Have you read CONTRIBUTING.md lately? If not, do that first.
I, the developer opening this PR, do solemnly pinky swear that:
In all cases: