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

API Schemas are not updated #1557

Closed
tshaiman opened this issue Feb 26, 2023 · 14 comments
Closed

API Schemas are not updated #1557

tshaiman opened this issue Feb 26, 2023 · 14 comments

Comments

@tshaiman
Copy link

In many of the existing resources the plugin has warnings that suggests that the API Version is not support.
in fact most chances are that the plugin metadata information is out of sync with the latest API's

e.g : for Log Analytics workspaces it says apiVersion: "22-10-01" is not valid, while in fact that is the most up-to-date version

image

from Azure Docs :
https://learn.microsoft.com/en-us/azure/templates/microsoft.operationalinsights/workspaces?pivots=deployment-language-arm-template

image

@StephenWeatherford
Copy link
Contributor

@anthony-c-martin The latest version I see in https://schema.management.azure.com/schemas/common/autogeneratedResources.json is this:

                "$ref": "https://schema.management.azure.com/schemas/2021-12-01-preview/Microsoft.OperationalInsights.json#/resourceDefinitions/workspaces"

Bicep is fine with 2022-10-01, though. Any "insights"? :-) Thx.

@S-Tasker
Copy link

The schemas appear to have not been updated in this addon in quite a while.
I can see that the schemas exist, and have been generated in the repo here: https://github.com/Azure/azure-resource-manager-schemas/tree/main/schemas

However, they've not been imported into the Plugin for VSCode.
Example:
image

@StephenWeatherford
Copy link
Contributor

@S-Tasker Yes I'm working on that (#1558). In the particular case @tshaiman mentions, though, the schema update doesn't seem to fix it because the one version doesn't appear to be propagated properly to the schema root.

@StephenWeatherford
Copy link
Contributor

Updated schemas will ship in next release.

Working:
Microsoft.Storage/storageAccounts/fileServices

Still not working (due to schema issues mentioned above):
Microsoft.OperationalInsights/workspaces
image

@anthony-c-martin
Copy link
Member

anthony-c-martin commented Mar 16, 2023

@StephenWeatherford I've kicked off a run of https://github.com/Azure/azure-resource-manager-schemas/actions/runs/4432345621 - should hopefully shed some light on what's going on with operationalinsights.

EDIT: this explains it 😄

> [email protected] generate-single
> ts-node cmd/generatesingle --base-path operationalinsights/resource-manager --local-path /home/runner/work/azure-resource-manager-schemas/azure-resource-manager-schemas/workflow-temp/azure-rest-api-specs

Path operationalinsights/resource-manager has been disabled for generation:
{
  "basePath": "operationalinsights/resource-manager",
  "namespace": "Microsoft.OperationalInsights",
  "disabledForAutogen": true
}

https://github.com/Azure/azure-resource-manager-schemas/blob/5ed6daf7ae7a96c66487de62961ef25a27545435/generator/autogenlist.ts#L101

@anthony-c-martin
Copy link
Member

@jorgecotillo any context on this? Azure/azure-resource-manager-schemas@f085aeb

@jorgecotillo
Copy link
Collaborator

@anthony-c-martin there is an enum mismatch and hasn't been updated:
https://github.com/Azure/azure-rest-api-specs/blob/ee157d6bbf6e4c4fdc8a47b380e00ddd56a0e852/specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/Tables.json#L761 -> enum vs values.

I'll create a PR in the rest-api-specs repo.

@tshaiman
Copy link
Author

tshaiman commented Mar 23, 2023

when trying to update the VS Code Plugin v0.15.9 you get an error :

2023-03-23 03:31:56.154 [info] [perf] Render performance baseline is 16ms
2023-03-23 03:32:14.432 [error] RequestService#request (browser) - error https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery {"name":"Canceled"}
2023-03-23 03:32:22.643 [error] Signature: PackageIntegrityCheckFailed
    at yt.download (vscode-file://vscode-app/c:/Users/tshaiman/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/node/sharedProcess/sharedProcessMain.js:91:468)
    at async X.x (vscode-file://vscode-app/c:/Users/tshaiman/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/node/sharedProcess/sharedProcessMain.js:91:20760)
    at async X.h (vscode-file://vscode-app/c:/Users/tshaiman/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/node/sharedProcess/sharedProcessMain.js:91:18897)
2023-03-23 03:32:22.663 [error] PackageIntegrityCheckFailed: Signature: PackageIntegrityCheckFailed
    at yt.download (vscode-file://vscode-app/c:/Users/tshaiman/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/node/sharedProcess/sharedProcessMain.js:91:468)
    at async X.x (vscode-file://vscode-app/c:/Users/tshaiman/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/node/sharedProcess/sharedProcessMain.js:91:20760)
    at async X.h (vscode-file://vscode-app/c:/Users/tshaiman/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/node/sharedProcess/sharedProcessMain.js:91:18897)

@StephenWeatherford
Copy link
Contributor

StephenWeatherford commented Mar 23, 2023

@tshaiman I saw that, too, but upon investigating it didn't seem to be related to this extension. Can you try F1->Disable All Installed Extensions, then reenable ARM Tools and try again?

@tshaiman
Copy link
Author

same same

@StephenWeatherford
Copy link
Contributor

@tshaiman Continuing this thread here: #1572

@Philippe85
Copy link

Philippe85 commented Jul 6, 2023

In v0.15.10, API Schemas are not updated with last version for these components :

image

image

image

image

image

@StephenWeatherford StephenWeatherford self-assigned this Jul 6, 2023
@StephenWeatherford StephenWeatherford added this to the v0.15.11 (August) milestone Aug 24, 2023
@StephenWeatherford
Copy link
Contributor

@Philippe85 Fixed in next release, thanks.

@StephenWeatherford
Copy link
Contributor

Microsoft.OperationalInsights/workspaces tracked in #1628, everything else should be working in next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants