[ARO-1542] Implement Azure SDK clients in MIMO Actuator#4761
[ARO-1542] Implement Azure SDK clients in MIMO Actuator#4761
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Azure Track 2 SDK client access to the MIMO Actuator task context so tasks can lazily obtain Azure clients from a single place, and updates actuator plumbing/tests to include subscription context.
Changes:
- Extend
mimo.TaskContextto expose Azure Track 2 SDK client getters (network/compute/ACR) and wire lazy client creation into the actuator task context. - Plumb
SubscriptionDocumentaccess through the actuator/service so tenant-aware credentials can be created per cluster subscription. - Update MIMO step/actuator tests and fake test contexts to use the new task context shape.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/mimo/tasks/testcontext.go | Expands fake TaskContext to support Azure client getters and subscription/cluster docs. |
| pkg/util/mimo/taskcontext.go | Extends TaskContext interface with Azure client getters; tweaks type assertion error message. |
| pkg/util/acrtoken/acrtoken.go | Adds an additional ACR token manager constructor. |
| pkg/mimo/steps/cluster/tls_test.go | Updates tests to pass OpenShiftClusterDocument into fake context. |
| pkg/mimo/steps/cluster/msi_test.go | Updates tests to pass OpenShiftClusterDocument into fake context. |
| pkg/mimo/steps/cluster/mdsd_test.go | Updates tests to pass OpenShiftClusterDocument into fake context. |
| pkg/mimo/steps/cluster/acrtoken_checker_test.go | Updates tests to pass OpenShiftClusterDocument into fake context. |
| pkg/mimo/actuator/task.go | Extends actuator task context to carry subscription doc and Azure client cache. |
| pkg/mimo/actuator/task_azure.go | Introduces lazy initialization for Azure Track 2 SDK clients using FP cert creds. |
| pkg/mimo/actuator/service.go | Fetches Subscriptions DB and passes it into the actuator. |
| pkg/mimo/actuator/service_test.go | Updates service tests/fixtures to include subscription docs and DB group wiring. |
| pkg/mimo/actuator/manager.go | Fetches subscription doc during processing and passes it into task contexts; adjusts return value to reflect actual work done. |
| pkg/mimo/actuator/actuator_test.go | Updates actuator tests to include subscription fixtures and adds coverage for missing subscription. |
| cmd/aro/mimoactuator.go | Wires Subscriptions DB into the MIMO actuator command startup. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
83d9387 to
b4bfb8f
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b4bfb8f to
2fc8f94
Compare
wanghaoran1988
left a comment
There was a problem hiding this comment.
Two inline review comments.
…nsport for azure testing
2fc8f94 to
db54db0
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/azp run ci |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Which issue this PR addresses:
Part of ARO-1542
What this PR does / why we need it:
Implements the ability for MIMO tasks to use Azure clients through a single source. Clients are only generated when they are used.
Test plan for issue:
This code is currently unused but will be tested by parts of ARO-1542 and ARO-23471.
Is there any documentation that needs to be updated for this PR?
Existing documentation covers how to access items on the TaskContext.
How do you know this will function as expected in production?
N/A