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

Bug: Unable to import any resources from Insights version 2021-05-01-preview #4337

Closed
theunrepentantgeek opened this issue Oct 13, 2024 · 0 comments · Fixed by #4346
Closed
Assignees
Labels
bug 🪲 Something isn't working

Comments

@theunrepentantgeek
Copy link
Member

Describe the bug

When trying to import a new resource from Microsoft.Insights, the Load Types stage of the generator crashes with a panic. This is the error from the start of the panic (formatted for readability):

error generating code: 
failed to execute stage 1: Load all types from Swagger files: 
panic: 
While merging file /workspaces/azure-service-operator/v2/specs/azure-rest-api-specs/specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/subscriptionDiagnosticsSettings_API.json: 
duplicate resource types generated

To Reproduce

Add this to the objectModelConfiguration section for insights:

    2021-05-01-preview:
      DiagnosticSetting:
        $export: true
        $supportedFrom: v2.10.0

Also add this to the typeFilters (to allow the new preview version to be seen):

  - action: include
    group: insights
    version: v*20210501preview
    because: We're using DiagnosticSetting from this.

Expected behavior

The specified resource should be imported.

If any error occurs, the error message should be useful to an end user.

Additional context

Error reported via Slack.

@theunrepentantgeek theunrepentantgeek added the bug 🪲 Something isn't working label Oct 13, 2024
@theunrepentantgeek theunrepentantgeek changed the title Bug: <Brief description of bug> Bug: Unable to import any resources from Insights version 2021-05-01-preview Oct 13, 2024
@theunrepentantgeek theunrepentantgeek self-assigned this Oct 13, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Recently Completed in Azure Service Operator Roadmap Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
1 participant