[release-4.20] OCPBUGS-77109: Add UserAgent telemetry to CPO Azure SDK clients#8374
Conversation
The Control Plane Operator (CPO) was not setting the UserAgent in the
Azure SDK TelemetryOptions when creating Azure ARM SDK clients. This
meant Azure API requests from CPO did not include proper application
identification for request tracing and telemetry purposes.
This commit adds:
- CPOUserAgent constant ("hypershift-cpo") for application identification
- GetAzureCloudConfiguration helper to convert cloud names to SDK configs
- NewARMClientOptions helper function that creates Azure ARM client options
with proper cloud configuration and TelemetryOptions.ApplicationID set
- Updated GetVnetInfoFromVnetID, GetNetworkSecurityGroupInfo, and
GetResourceGroupInfo functions to accept a cloudName parameter and use
the new helper function for proper telemetry configuration
- Updated validateAzureKMSConfig to include telemetry options when
creating the Azure Key Vault keys client
- Updated verifyResourceGroupLocationsMatch to pass the cloud name
- Unit tests for the new NewARMClientOptions function
This is a manual cherry-pick of fd6dcef and c279efc from main,
with the addition of GetAzureCloudConfiguration (from 40e255a) which
was a prerequisite not present on release-4.20.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@bryan-cox: This pull request references Jira Issue OCPBUGS-77109, which is valid. The bug has been moved to the POST state. 7 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (yli2@redhat.com), skipping review request. The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bryan-cox The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@bryan-cox: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/lgtm |
|
/label backport-risk-assessed |
|
/verified by UT |
|
@bryan-cox: This PR has been marked as verified by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
58965fe
into
openshift:release-4.20
|
@bryan-cox: Jira Issue Verification Checks: Jira Issue OCPBUGS-77109 Jira Issue OCPBUGS-77109 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Summary
Manual cherry-pick of #7620 to
release-4.20with conflict resolution.The cherrypick-robot failed due to merge conflicts in
support/azureutil/azureutil.goandsupport/azureutil/azureutil_test.go. The conflicts arose because the original commits depended onGetAzureCloudConfiguration(from commit 40e255a, "make Azure SDK clients cloud-agnostic") which was not present onrelease-4.20.Commits cherry-picked
Fixes applied
GetAzureCloudConfigurationhelper function (from 40e255a) as a prerequisite dependencysupport/azureutil/azureutil.goandsupport/azureutil/azureutil_test.goReferences
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com