fix: remove confidential VM SKUs (DC,EC) from consideration #23
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #
Description
This removes confidential VM SKUs (DC,EC) from consideration, since the current provider does not support them (yet). The implementation looks for DC or EC prefix in the VM Size name, as apparently there is no direct confidential capability indication available in SKU resource API. Not filtering all *C, because NCs are supported GPU SKUs.
The above is the only functional change, the rest is refactoring and test.
Some of the refactoring was needed to consolidate all filtering in one place, and without triggering gocyclo.
Consolidated filter also fixes the post-filter count of SKUs reported in the log. Expect it to be lower (and not just because confidential VMs are now filtered out).
How was this change tested?
make presubmit
Does this change impact docs?