question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] GalleryArtifactPublishingProfileBase is missing Source property in .Net SDK

See original GitHub issue

Describe the bug In the .Net SDK, the Source property of GalleryArtifactPublishingProfileBase is missing. It appears to have been removed in this PR which updated the compute API version to 2019-03-01.

However, according to the ARM schema in the PR that created version 2019-03-01, the property is still there and in fact the Java SDK still has the property as well.

This doesn’t cause a runtime bug, but it is an undocumented breaking change in the .Net SDK and likely a bug in the auto-generation of the .Net source.

Exception or Stack Trace N/A

To Reproduce N/A

Code Snippet N/A

Expected behavior The Source property should exist in the GalleryArtifactPublishingProfileBase class in the .Net SDK

Screenshots N/A

Setup (please complete the following information): N/A

Additional context

Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
weidongxu-microsoftcommented, Dec 21, 2020

@cmbrose

You can enable logging and check the raw response JSON from server. https://github.com/Azure/azure-libraries-for-net#logging

From what I captured from the response, source is not there in publishingProfile (image created from managed disk). However I saw a source property in storageProfile. Is it same as what you would expect in publishingProfile?

{
   "value":[
      {
         "name":"0.0.1",
         "id":"/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rg-weidxu/providers/Microsoft.Compute/galleries/sig1weidxu/images/image1/versions/0.0.1",
         "type":"Microsoft.Compute/galleries/images/versions",
         "location":"japaneast",
         "tags":{
            
         },
         "properties":{
            "publishingProfile":{
               "targetRegions":[
                  {
                     "name":"Japan East",
                     "regionalReplicaCount":1,
                     "storageAccountType":"Standard_LRS"
                  }
               ],
               "replicaCount":1,
               "excludeFromLatest":false,
               "publishedDate":"2020-12-21T02:20:32.4321627+00:00",
               "endOfLifeDate":"2020-12-30T16:00:00+00:00",
               "storageAccountType":"Standard_LRS"
            },
            "storageProfile":{
               "osDiskImage":{
                  "sizeInGB":30,
                  "hostCaching":"None",
                  "source":{
                     "id":"/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/TANYI/providers/Microsoft.Compute/disks/voieorlskf"
                  }
               }
            },
            "provisioningState":"Succeeded"
         }
      },
      {
         "name":"0.0.2",
         "id":"/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/rg-weidxu/providers/Microsoft.Compute/galleries/sig1weidxu/images/image1/versions/0.0.2",
         "type":"Microsoft.Compute/galleries/images/versions",
         "location":"westus2",
         "tags":{
            
         },
         "properties":{
            "publishingProfile":{
               "targetRegions":[
                  {
                     "name":"West US 2",
                     "regionalReplicaCount":1,
                     "storageAccountType":"Standard_LRS"
                  }
               ],
               "replicaCount":1,
               "excludeFromLatest":false,
               "publishedDate":"2020-12-21T02:37:41.8353999+00:00",
               "endOfLifeDate":"2020-12-30T16:00:00+00:00",
               "storageAccountType":"Standard_LRS"
            },
            "storageProfile":{
               "osDiskImage":{
                  "sizeInGB":30,
                  "hostCaching":"None",
                  "source":{
                     "id":"/subscriptions/ec0aa5f7-9e78-40c9-85cd-535c6305b380/resourceGroups/RG-WEIDXU/providers/Microsoft.Compute/disks/vm1weidxu_OsDisk_1_cadeacd5fde2431ca01298237773b39a"
                  }
               }
            },
            "provisioningState":"Succeeded"
         }
      }
   ]
}
0reactions
cmbrosecommented, Jan 11, 2021

@weidongxu-microsoft thanks for that info! I think we can close this one out in that case and I can follow up with the compute API owners as needed

Read more comments on GitHub >

github_iconTop Results From Across the Web

NETSDK1045: The current .NET SDK does not support ...
Open the Solution Properties window (ctrl-click the solution in the Solution window and select Properties), select Build - General, and uncheck ...
Read more >
The Specified SDK "Microsoft.NET.Sdk" was not Found
I was getting this error when trying to load projects targetting .NET core (Project Sdk property Microsoft.NET.Sdk). My environment at the ...
Read more >
Troubleshooting: 'The .NET Core SDK cannot be located. ...
What this error means is that this extension ran the command dotnet and dotnet was NOT found on the PATH within the extension's...
Read more >
Visual Studio 2019 unable to locate .Net Core SDK
Step 1) First run dotnet --list-sdks from the command line (as in Grzegorz Smulko's answer). Take note of the greatest version number.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found