Skip to content

refactor: small fixes to size parsing - #56

Merged
Matthew Christopher (matthchr) merged 1 commit into
Azure:mainfrom
matthchr:matthchr/small-fixes
Nov 9, 2026
Merged

Matthew Christopher (matthchr) merged 1 commit into
Azure:mainfrom
matthchr:matthchr/small-fixes

Conversation

@matthchr

Copy link
Copy Markdown
Member
  • Improve regex parsing readability with named capture groups.
  • Add comments to VMSizeType with examples to showcase what each field does.
  • Remove unused (never set) H100/MI300X fields. Use the AcceleratorType field instead.

@MaximilianoUribe

Copy link
Copy Markdown
Contributor

(AI-generated)

Could we add a Test_GetVMSize case for the confidential GPU size NCC40ads_H100_v5? It's the only GPU size that uses subfamilyExtra, and right now nothing checks that it parses to Subfamily: "CC". Verified against this branch in both modules:

{
	name: "Standard_NCC40ads_H100_v5",
	size: "NCC40ads_H100_v5",
	expectedVM: &VMSizeType{
		Family:                      "N",
		Subfamily:                   to.Ptr("CC"),
		Cpus:                        "40",
		AdditiveFeatures:            []rune{'a', 'd', 's'},
		AcceleratorType:             to.Ptr("H100"),
		ConfidentialChildCapability: false,
		Version:                     "v5",
		Series:                      "NCCads_v5",
	},
},

* Improve regex parsing readability with named capture groups.
* Add comments to VMSizeType with examples to showcase what each field
  does.
* Remove unused (never set) H100/MI300X fields. Use the AcceleratorType
  field instead.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@matthchr
Matthew Christopher (matthchr) merged commit 25d9b59 into Azure:main Nov 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants