-
Notifications
You must be signed in to change notification settings - Fork 170
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
SDK2: Remove old SDK from Dynamic/ValidateQuota #3889
base: master
Are you sure you want to change the base?
Conversation
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
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.
Mostly LGTM. I think there's some convention questions as well as a question around why the use of v2 vs v6 (the current version in the repo)
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.
Thanks to hawkowl we realised there are fakes etc available so we no longer have need for generating our own mocks. See pkg/util/liveconfig/hive_test.go in my PR https://github.com/Azure/ARO-RP/pull/3889/files
it's better to keep the code as it is because the PR aims to replace the usage of mgmt clients, and changes of the way of testing (or change the way of listing) is out of scope. |
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.
LGTM; 1 question
"github.com/Azure/go-autorest/autorest/to" | ||
"github.com/sirupsen/logrus" | ||
"go.uber.org/mock/gomock" | ||
"k8s.io/utils/ptr" |
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.
Why are we using this lib instead of just going with to.Ptr
?
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.
Because it's already deprecated.
https://github.com/Azure/go-autorest
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 to
functionality moved into the core sdk: github.com/Azure/azure-sdk-for-go/sdk/azcore/to
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.
There are already usages of ptr.To
in other places. We should discuss which should be used, but anyway we need to change the code from to.*Ptr
to to.Ptr
or ptr.To
.
I don't have any preference.
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 started a discussion
https://redhat-internal.slack.com/archives/C02ULBRS68M/p1731940533915429
Please rebase pull request. |
fb6d031
to
4b757f8
Compare
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
Please rebase pull request. |
This will conflict with #3922. |
Which issue this PR addresses:
Fixes https://issues.redhat.com/browse/ARO-4665
What this PR does / why we need it:
This PR replaces the old SDK to the new SDK2.
It affects Dynamic pkg (used in validateResources step) and ValidateQuota.go (used in openshiftcluster_putorpatch.go).
Test plan for issue:
e2e, ci
e2e creates a cluster, which verifies the validateResource step and ValidateQuota.
Is there any documentation that needs to be updated for this PR?
na
How do you know this will function as expected in production?
Cluster creation will verify the change