-
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 should aggregate Import Service and cWDS #1308
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1308 +/- ##
===========================================
- Coverage 69.31% 69.19% -0.13%
===========================================
Files 97 98 +1
Lines 3406 3441 +35
Branches 369 377 +8
===========================================
+ Hits 2361 2381 +20
- Misses 1045 1060 +15 ☔ View full report in Codecov by Sentry. |
val importServiceResponse = List( | ||
ImportServiceListResponse("jobId1", "status1", "filetype1", None), | ||
ImportServiceListResponse("jobId2", "status2", "filetype2", None) | ||
) |
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.
It weirds me out that these two list have identical jobIds. Not clear how/if that will impact the test
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.
copy/paste error, fixed!
} | ||
|
||
private def toImportServiceStatus(cwdsStatus: GenericJob.StatusEnum): String = { | ||
STATUS_TRANSLATION.getOrElse(cwdsStatus, "blah") |
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.
Maybe this could throw an error if there's no translation?
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 added a code comment; I would prefer to not fail, but now this returns "Unknown" instead of the draft-for-early-review "blah"
// get jobs from cWDS | ||
cwdsJobs = cwdsDAO.listJobsV1(workspace.workspace.workspaceId, runningOnly)(userInfo) | ||
} yield { | ||
// merge Import Service and cWDS results |
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.
not for this PR, but maybe for the metrics theme: this might be a good spot to add some metric instrumentation to understand migration status:
- measure latency of each dispatch for comparison
- measure the # of jobs returned from each for comparison
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.
Looks good to me, all comments are optional/future.
AJ-1602
High-level changes:
CwdsDAO
trait, withHttp*
andMock*
implementationscwds.enabled
(see https://github.com/broadinstitute/terra-helmfile/pull/5261):open questions:
for a future PR:
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: