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

Azure-rest-api-specs PR SDK azure-sdk-for-net-track2 task failing with "Cannot determine a resource class name for resource" #3174

Open
Rusalunk opened this issue Feb 25, 2023 · 1 comment
Labels
Mgmt This issue is related to a management-plane library. v3 Version 3 of AutoRest C# generator.

Comments

@Rusalunk
Copy link

Rusalunk commented Feb 25, 2023

Describe the issue or request
Azure-rest-api-specs PR SDK azure-sdk-for-net-track2 task failing with below error:

[Invoke-GenerateAndBuildV2.ps1] Exception: Cannot determine a resource class name for resource with the request path: {}, please assign a valid resource name in request-path-to-resource-name section.

Build : https://dev.azure.com/azure-sdk/internal/_build/results?buildId=2211811&view=logs&j=03afb3bb-7296-55ad-aa07-ceee610c73b2&t=0f320c29-1c90-5304-d2d3-c58a6bb76437

PR : Azure/azure-rest-api-specs#22766

Can I get the help in understanding the issue, as we have created the resource name classes with existing similar paths in the past with no issue.

Describe your ideas for solutions
Please describe how you think a change or changes might work. Consider
how these changes might work for multiple services.

Add labels
As appropriate, select a label to describe how hard the issue is to work
around or how hard it would be to do without a particular feature that
could help make it easier. These labels start with "workaround".

Also select a label that describes how many instances of the workaround
you would have to do without the bug being fixed or feature implemented.
These labels start with "instances".

These labels will help priority bug fixes and feature requests.

If this bug or feature request is for older versions of autorest, please
remove the v3 label and add the v2 label as appropriate.

@Rusalunk Rusalunk added the v3 Version 3 of AutoRest C# generator. label Feb 25, 2023
@chunyu3 chunyu3 added the Mgmt This issue is related to a management-plane library. label Feb 27, 2023
@ArcturusZhang
Copy link
Member

ArcturusZhang commented Mar 15, 2023

Hi @Rusalunk this happens because the generator cannot determine resource name for some of the resources, it is explicitly asking for suggestions. To solve this, we need to add some configurations into the request-path-to-resource-name mapping from its path to the resource name.
In your case, you need to add a resource name for this resource /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mgmt This issue is related to a management-plane library. v3 Version 3 of AutoRest C# generator.
Projects
None yet
Development

No branches or pull requests

3 participants