Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Conversation

@Porges
Copy link
Member

@Porges Porges commented Sep 9, 2022

  • Turn ImageReference into its own type so it is validated early on in request submission time, and we don't end up with malformed IDs, etc.
  • Add in support for shared image galleries since that was easy enough to add while I'm doing this.
  • Explicitly document which image sources are permitted and how to reference them with resource IDs.

This addresses/closes #1464 for the C# port. Also fixes #2927 which was recently reported.


Manually verified, I can create scalesets with:

  • Latest image: /subscriptions/{}/resourceGroups/{}/providers/Microsoft.Compute/galleries/{}/images/{}
  • Specific image: /subscriptions/{}/resourceGroups/{}/providers/Microsoft.Compute/galleries/{}/images/{}/versions/{}
  • Marketplace image: Canonical:0000-com-ubuntu-server-focal:20_04-lts:latest
  • VM Image /subscriptions/{}/resourceGroups/{}/providers/Microsoft.Compute/images/{}

Not manually verified:

  • Latest shared image: /subscriptions/{}/resourceGroups/{}/providers/Microsoft.Compute/locations/{}/sharedGalleries/{}/images/{}
  • Specific shared image: /subscriptions/{}/resourceGroups/{}/providers/Microsoft.Compute/locations/{}/sharedGalleries/{}/images/{}/versions/{}

@Porges Porges changed the title Examine ResourceType to decide how to handle image resource identifier Turn ImageReference into its own type Sep 9, 2022
@Porges Porges force-pushed the examine-resource-id branch 3 times, most recently from 7fa5ba9 to 3d2a07d Compare September 9, 2022 04:59
@Porges Porges changed the title Turn ImageReference into its own type Make ImageReference strongly-typed and checked up-front Sep 9, 2022
@Porges
Copy link
Member Author

Porges commented Sep 9, 2022

Need to do some validation that shared images work as expected before merging.

@Porges Porges force-pushed the examine-resource-id branch 5 times, most recently from e9f2807 to 0a89ca9 Compare September 13, 2022 21:49
@Porges Porges force-pushed the examine-resource-id branch from 0a89ca9 to d060da8 Compare September 15, 2022 02:59
@codecov-commenter
Copy link

codecov-commenter commented Sep 15, 2022

Codecov Report

Merging #2369 (d195d5a) into main (6d5161c) will increase coverage by 0.15%.
The diff coverage is 41.98%.

@@            Coverage Diff             @@
##             main    #2369      +/-   ##
==========================================
+ Coverage   28.93%   29.09%   +0.15%     
==========================================
  Files         303      303              
  Lines       36133    36170      +37     
==========================================
+ Hits        10455    10523      +68     
+ Misses      25678    25647      -31     
Impacted Files Coverage Δ
src/ApiService/ApiService/Functions/Scaleset.cs 39.28% <0.00%> (ø)
src/ApiService/ApiService/Program.cs 15.78% <ø> (+0.11%) ⬆️
...ApiService/ApiService/onefuzzlib/OnefuzzContext.cs 0.00% <ø> (ø)
...piService/ApiService/onefuzzlib/ProxyOperations.cs 0.00% <0.00%> (ø)
...piService/ApiService/onefuzzlib/ReproOperations.cs 10.81% <0.00%> (ø)
...c/ApiService/ApiService/onefuzzlib/VmOperations.cs 0.00% <0.00%> (ø)
...ApiService/ApiService/onefuzzlib/VmssOperations.cs 0.00% <0.00%> (ø)
...ervice/ApiService/onefuzzlib/ScalesetOperations.cs 2.87% <25.00%> (+0.19%) ⬆️
...ApiService/ApiService/onefuzzlib/ImageReference.cs 41.14% <41.14%> (ø)
...ApiService/ApiService/onefuzzlib/TaskOperations.cs 30.80% <50.00%> (+0.29%) ⬆️
... and 5 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Porges Porges enabled auto-merge (squash) March 26, 2023 22:08
@Porges Porges merged commit 3c3f12a into main Mar 26, 2023
@Porges Porges deleted the examine-resource-id branch March 26, 2023 22:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Azure Compute Gallery support no longer exists in the .NET release Parse Azure Resource IDs into models

4 participants