openshift / installer

Install an OpenShift 4.x cluster
https://try.openshift.com
Apache License 2.0
1.44k stars 1.39k forks source link

[release-4.15] CORS-3753: Allow mocking of the Azure client everywhere #9221

Closed zaneb closed 1 day ago

zaneb commented 5 days ago

Currently the Azure client can only be mocked in unit tests of the pkg/asset/installconfig/azure package. Using the mockable interface consistently and adding a public interface to set it up will allow other packages to write unit tests for code involving the Azure client.

This is a backport from #9220

openshift-ci-robot commented 5 days ago

@zaneb: This pull request references CORS-3753 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target either version "4.15." or "openshift-4.15.", but it targets "4.18.0" instead.

In response to [this](https://github.com/openshift/installer/pull/9221): >Currently the Azure client can only be mocked in unit tests of the `pkg/asset/installconfig/azure` package. Using the mockable interface consistently and adding a public interface to set it up will allow other packages to write unit tests for code involving the Azure client. > >This is a backport from #9220 Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Finstaller). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
zaneb commented 5 days ago

/label backport-risk-assessed /cc @patrickdillon

openshift-ci[bot] commented 5 days ago

@zaneb: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-azure-ovn-resourcegroup cf4e1ae719b0407396937b141fe297d14021555f link false /test e2e-azure-ovn-resourcegroup
ci/prow/okd-scos-e2e-aws-upgrade cf4e1ae719b0407396937b141fe297d14021555f link false /test okd-scos-e2e-aws-upgrade
ci/prow/okd-scos-e2e-aws-ovn cf4e1ae719b0407396937b141fe297d14021555f link false /test okd-scos-e2e-aws-ovn
ci/prow/e2e-azurestack cf4e1ae719b0407396937b141fe297d14021555f link false /test e2e-azurestack
ci/prow/e2e-vsphere-static-ovn cf4e1ae719b0407396937b141fe297d14021555f link false /test e2e-vsphere-static-ovn

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
sadasu commented 5 days ago

/approve

openshift-ci[bot] commented 5 days ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sadasu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/openshift/installer/blob/release-4.15/OWNERS)~~ [sadasu] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
gpei commented 4 days ago

/label cherry-pick-approved

patrickdillon commented 3 days ago

/lgtm

zaneb commented 1 day ago

As discussed, I will manually apply the valid-bug label. We are backporting this on the grounds that it affects internal APIs for unit tests only.

openshift-bot commented 14 hours ago

[ART PR BUILD NOTIFIER]

Distgit: ose-installer-altinfra This PR has been included in build ose-installer-altinfra-container-v4.15.0-202411250834.p0.gaa127ac.assembly.stream.el8. All builds following this will include this PR.

openshift-bot commented 12 hours ago

[ART PR BUILD NOTIFIER]

Distgit: ose-installer-terraform-providers This PR has been included in build ose-installer-terraform-providers-container-v4.15.0-202411250834.p0.gaa127ac.assembly.stream.el8. All builds following this will include this PR.

openshift-bot commented 10 hours ago

[ART PR BUILD NOTIFIER]

Distgit: ose-baremetal-installer This PR has been included in build ose-baremetal-installer-container-v4.15.0-202411250834.p0.gaa127ac.assembly.stream.el8. All builds following this will include this PR.

openshift-bot commented 10 hours ago

[ART PR BUILD NOTIFIER]

Distgit: ose-installer-artifacts This PR has been included in build ose-installer-artifacts-container-v4.15.0-202411250834.p0.gaa127ac.assembly.stream.el8. All builds following this will include this PR.