Skip to content

[release-4.20] OCPBUGS-77109: Add UserAgent telemetry to CPO Azure SDK clients#8374

Merged
openshift-merge-bot[bot] merged 2 commits intoopenshift:release-4.20from
bryan-cox:cherry-pick-OCPBUGS-77109-to-release-4.20
Apr 30, 2026
Merged

[release-4.20] OCPBUGS-77109: Add UserAgent telemetry to CPO Azure SDK clients#8374
openshift-merge-bot[bot] merged 2 commits intoopenshift:release-4.20from
bryan-cox:cherry-pick-OCPBUGS-77109-to-release-4.20

Conversation

@bryan-cox
Copy link
Copy Markdown
Member

Summary

Manual cherry-pick of #7620 to release-4.20 with conflict resolution.

The cherrypick-robot failed due to merge conflicts in support/azureutil/azureutil.go and support/azureutil/azureutil_test.go. The conflicts arose because the original commits depended on GetAzureCloudConfiguration (from commit 40e255a, "make Azure SDK clients cloud-agnostic") which was not present on release-4.20.

Commits cherry-picked

  • fd6dcef: feat(support/azureutil): Add UserAgent telemetry for Azure ARM clients
  • c279efc: feat(cpo): Add UserAgent telemetry to Azure Key Vault client

Fixes applied

  • Included GetAzureCloudConfiguration helper function (from 40e255a) as a prerequisite dependency
  • Resolved merge conflicts in support/azureutil/azureutil.go and support/azureutil/azureutil_test.go

References

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

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>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 29, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@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
  • bug is open, matching expected state (open)
  • bug target version (4.20.z) matches configured target version for branch (4.20.z)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-76447 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-76447 targets the "4.21.z" version, which is one of the valid target versions: 4.21.0, 4.21.z
  • bug has dependents

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.

Details

In response to this:

Summary

Manual cherry-pick of #7620 to release-4.20 with conflict resolution.

The cherrypick-robot failed due to merge conflicts in support/azureutil/azureutil.go and support/azureutil/azureutil_test.go. The conflicts arose because the original commits depended on GetAzureCloudConfiguration (from commit 40e255a, "make Azure SDK clients cloud-agnostic") which was not present on release-4.20.

Commits cherry-picked

  • fd6dcef: feat(support/azureutil): Add UserAgent telemetry for Azure ARM clients
  • c279efc: feat(cpo): Add UserAgent telemetry to Azure Key Vault client

Fixes applied

  • Included GetAzureCloudConfiguration helper function (from 40e255a) as a prerequisite dependency
  • Resolved merge conflicts in support/azureutil/azureutil.go and support/azureutil/azureutil_test.go

References

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

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.

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Apr 29, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 29, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a67f500e-6fdc-435f-8c2a-d245fd1d0cae

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot requested review from hasueki and rtheis April 29, 2026 16:42
@openshift-ci openshift-ci Bot added the area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release label Apr 29, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 29, 2026

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed do-not-merge/needs-area labels Apr 29, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 29, 2026

@bryan-cox: all tests passed!

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

@jparrill
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 30, 2026
@csrwng
Copy link
Copy Markdown
Contributor

csrwng commented Apr 30, 2026

/label backport-risk-assessed

@enxebre enxebre added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Apr 30, 2026
@bryan-cox
Copy link
Copy Markdown
Member Author

/verified by UT

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Apr 30, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@bryan-cox: This PR has been marked as verified by UT.

Details

In response to this:

/verified by UT

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.

@openshift-merge-bot openshift-merge-bot Bot merged commit 58965fe into openshift:release-4.20 Apr 30, 2026
18 checks passed
@openshift-ci-robot
Copy link
Copy Markdown

@bryan-cox: Jira Issue Verification Checks: Jira Issue OCPBUGS-77109
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

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. 🕓

Details

In response to this:

Summary

Manual cherry-pick of #7620 to release-4.20 with conflict resolution.

The cherrypick-robot failed due to merge conflicts in support/azureutil/azureutil.go and support/azureutil/azureutil_test.go. The conflicts arose because the original commits depended on GetAzureCloudConfiguration (from commit 40e255a, "make Azure SDK clients cloud-agnostic") which was not present on release-4.20.

Commits cherry-picked

  • fd6dcef: feat(support/azureutil): Add UserAgent telemetry for Azure ARM clients
  • c279efc: feat(cpo): Add UserAgent telemetry to Azure Key Vault client

Fixes applied

  • Included GetAzureCloudConfiguration helper function (from 40e255a) as a prerequisite dependency
  • Resolved merge conflicts in support/azureutil/azureutil.go and support/azureutil/azureutil_test.go

References

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

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.

@bryan-cox bryan-cox deleted the cherry-pick-OCPBUGS-77109-to-release-4.20 branch April 30, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants