Skip to content
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

mgmt compute support vm size enum generation #17476

Closed
wants to merge 2 commits into from

Conversation

xseeseesee
Copy link
Contributor

@xseeseesee xseeseesee commented Nov 11, 2020

As compute service team mentioned before, they plan to remove the VM sizes from swagger spec. The recent spec PR shows they already start to work for this.

To avoid breaking change from SDK side, this PR could be potential solution to list resource skus and generate latest VM size enum type when it's required to update. After this got merged, I can open another one to revise the fixed value we applied to vm tests before.

Update:
The revapi reports below error

[ERROR] java.field.removed: field com.azure.resourcemanager.compute.models.VirtualMachineSizeTypes.STANDARD_E32_16_V3: Field removed from class. (breaks semantic versioning)

Actually the swagger is incorrect here.
The same issue already reported here, while the fix only applied to docs.

@weidongxu-microsoft
Copy link
Member

Please take a note whether there is any sku type that get removed in this PR.

@weidongxu-microsoft
Copy link
Member

Add to CHANGELOG


/** Defines values for VirtualMachineSizeTypes. */
public final class VirtualMachineSizeTypes extends ExpandableStringEnum<VirtualMachineSizeTypes> {
TYPES_PLACE_HOLDER
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't appear as if it would compile?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's placed under ../src/test/resources/.. as template file. We prepared one test method to pull all the values and generate/update the enum class by this template.

@xseeseesee
Copy link
Contributor Author

Close this as the spec PR changed. They plan to remove the enum data type on Dec 23rd, 2023 while now they add deprecate message instead of removing the enum values.

@xseeseesee xseeseesee closed this Dec 22, 2020
@xseeseesee xseeseesee deleted the update-test-vmsize-cent branch December 22, 2020 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants