-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add async operation support to dynamic-rp #8161
Add async operation support to dynamic-rp #8161
Conversation
This change adds the async operationStatus and operationResult handlers to the dynamic-rp API. This change is significant, because like all functionality in dynamic-rp, it's dynamic and needs to work for any UDT resource provider rather than a fixed namespace. Signed-off-by: Ryan Nowak <[email protected]>
} | ||
|
||
err = databaseClient.Save(ctx, &database.Object{Data: operation, Metadata: database.Metadata{ID: operationStatusID}}) | ||
require.NoError(t, err) |
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.
One of the cool things about the integration-testing approach is that we can just manipulate the database if we need to simulate something tricky for a test 👍
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8161 +/- ##
=======================================
Coverage 60.04% 60.05%
=======================================
Files 580 581 +1
Lines 38469 38536 +67
=======================================
+ Hits 23097 23141 +44
- Misses 13678 13696 +18
- Partials 1694 1699 +5 ☔ View full report in Codecov by Sentry. |
if strings.HasSuffix(strings.ToLower(opts.ResourceType), "locations/operationstatuses") || strings.HasSuffix(strings.ToLower(opts.ResourceType), "locations/operationresults") { | ||
opts.ResourceType = id.ProviderNamespace() + "/operationstatuses" | ||
} |
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.
In either case, why do we set the Resource Type to operationStatuses?
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.
The comments right above here explain this, please make a suggestion if it's not clear.
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 just checked that we only have one for both which is Applications.Core/operationStatuses. Thanks.
Radius functional test overview
Click here to see the list of tools in the current test run
Test Status⌛ Building Radius and pushing container images for functional tests... |
Description
This change adds the async operationStatus and operationResult handlers to the dynamic-rp API. This change is significant, because like all functionality in dynamic-rp, it's dynamic and needs to work for any UDT resource provider rather than a fixed namespace.
Type of change
Fixes: #6688
Contributor checklist
Please verify that the PR meets the following requirements, where applicable: