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

AJ-1602: list-jobs API no longer a passthrough to Import Service #1305

Merged
merged 5 commits into from
Mar 12, 2024

Conversation

davidangb
Copy link
Contributor

@davidangb davidangb commented Mar 11, 2024

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:

  • I've followed the instructions if I've made any changes to the API, especially if they're breaking changes
  • I've updated the RC_XXX release ticket with any manual steps required to release this change
  • I've updated the FISMA documentation if I've made any security-related changes, including auth, encryption, or auditing

In all cases:

  • Get two thumbsworth of review and PO signoff if necessary
  • Verify all tests go green
  • Squash and merge; you can delete your branch after this unless it's for a hotfix. In that case, don't delete it!
  • Test this change deployed correctly and works on dev environment after deployment

Copy link

codecov bot commented Mar 12, 2024

Codecov Report

Attention: Patch coverage is 63.63636% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 69.29%. Comparing base (c53581f) to head (2e7f591).

Files Patch % Lines
...de/firecloud/dataaccess/HttpImportServiceDAO.scala 0.00% 4 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

"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,
Copy link
Contributor Author

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

}
}

}
Copy link
Contributor Author

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
}

Copy link
Contributor Author

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)
}
}
Copy link
Contributor Author

@davidangb davidangb Mar 12, 2024

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.

@davidangb davidangb marked this pull request as ready for review March 12, 2024 16:40
Copy link
Contributor

@jladieu jladieu left a comment

Choose a reason for hiding this comment

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

Cool!

Copy link
Contributor

@ashanhol ashanhol left a 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

@davidangb davidangb merged commit 664506a into develop Mar 12, 2024
13 of 15 checks passed
@davidangb davidangb deleted the da_AJ-1602_importServiceClient branch March 12, 2024 19:28
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.

4 participants