-
Notifications
You must be signed in to change notification settings - Fork 21
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
Enable v1 APIs for Disk, App, and Runtime for Azure hosted Leonardo instances #4737
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4737 +/- ##
===========================================
+ Coverage 73.90% 73.94% +0.03%
===========================================
Files 161 161
Lines 15054 15077 +23
Branches 1222 1234 +12
===========================================
+ Hits 11125 11148 +23
Misses 3929 3929
Continue to review full report in Codecov by Sentry.
|
@@ -122,10 +122,10 @@ class DiskServiceInterp[F[_]: Parallel](config: PersistentDiskConfig, | |||
): F[Unit] = | |||
for { | |||
ctx <- as.ask | |||
sourceAncestry <- F.fromFuture(F.delay(googleProjectDAO.getAncestry(sourceGoogleProject.value))) | |||
sourceAncestry <- F.fromFuture(F.delay(googleProjectDAO.get.getAncestry(sourceGoogleProject.value))) |
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.
My concern with sprinkling .get
in this code is that the API will fail with a HTTP 500 scala.MatchError
if these APIs are called in a Leo deployment with no GCP dependencies.
A cleaner option might be doing something like this in the appropriate endpoints (e.g. create/delete runtime/disk):
projectDAO <- F.fromOption(googleProjectDAO, BadRequestException("GCP is not enabled"))
// then use projectDAO as needed
Then you would get a sensible error message and HTTP status code if a GCP-specific API is called.
(I realize that this only affects the VA deployment and v1 create/delete runtime/disk will never actually be called. So just a minor suggestion.)
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.
Approving, but with a minor suggestion above.
Jira ticket: https://broadworkbench.atlassian.net/browse/TOAZ-366
Summary of changes
Enable v1 APIs for Disk, App, and Runtime for Azure hosted Leonardo instances.
What
Why
v1 APIs are still used in TerraUI for data retrieval even when hosted on Azure. This will be changed with ongoing development of platform agnostic v2 APIs
This change is covered by automated tests
jenkins retest
orjenkins multi-test
.I validated this change
Primary reviewer validated this change
I validated this change in the dev environment