-
Notifications
You must be signed in to change notification settings - Fork 196
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
Add support for 20240401 AML resources #4237
Conversation
@@ -2442,6 +2442,7 @@ objectModelConfiguration: | |||
UserAssignedIdentity: | |||
$armReference: false # Actually, this *IS* a resource id, but we want to avoid breaking changes so we're fibbing here | |||
KeyVaultProperties: | |||
$nameInNextVersion: EncryptionKeyVaultProperties | |||
KeyVaultArmId: | |||
$armReference: false # Actually, this *IS* a resource id, but we want to avoid breaking changes so we're fibbing here |
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.
Since we're already taking breaking changes here for PrivateKeyData
and PublicKeyData
, should we fix this up too? @matthchr, what do you think?
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 think we should avoid gratuitous breaking change unless there's a security reason behind it (like for the other properties).
For this one, ideally we fix this in a new API version - if we can do that here then yes that would be good to do.
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.
A few things that might need to be configurable - or maybe secrets? Otherwise looks really good.
v2/internal/controllers/crd_machinelearningservices_20240401_test.go
Outdated
Show resolved
Hide resolved
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.
Found some things that look like they might be secret fields?
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
package controllers_test |
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 think we've been naming these files following the new naming pattern which is _test.go - so in this case machinelearning_workspaces_20240401_test.go
.
I don't think changing this file name impacts the test recordings at all so it should be easy to change.
v2/samples/machinelearningservices/v1api20240401/v1api20240401_workspacesconnection.yaml
Outdated
Show resolved
Hide resolved
│ │ │ │ │ ├── "DenseProd" | ||
│ │ │ │ │ ├── "DevTest" | ||
│ │ │ │ │ └── "FastProd" | ||
│ │ │ │ ├── LoadBalancerSubnetReference: *genruntime.ResourceReference |
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 think we need a conversion for this, between the old value (which was a string) and the new value (which is a Reference
). D owe have one?
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.
Good point! I didn't add one, doesn't generator handle this case?
If not, since we're taking the breaking change anyway on this resource, should we mark this property as a ResourceReference
in the previous version as well or write a custom conversion? WDYT?
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.
My 2c is we should do custom conversion for anything that we can, to reduce the breakages between versions for folks
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.
Agreed. In the past we've handled this by leaving the old version with *string
, using *genruntime.ResourceReference
in the new version, and hand-crafting the conversion between the two.
This is done by implementing one of the augment*
interfaces to customize the conversion.
You can search for existing examples with
$ cd v2/api
$ git grep -in augment -- '*.go' ':(exclude)*_gen.go'
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.
Done!
What this PR does / why we need it:
This PR includes latest version of AML resources. Consider this as a starting point to support further AML resources in next iteration.
Special notes for your reviewer:
This PR includes breaking changes for
WorkspacesCompute
20210701 API version below:If applicable: