-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
AutoRest azure-validator erroneously fails on core version ~2.0.4413 but not ^3.2.0 #15654
Comments
@forteddyt this is a autorest v2 issue, as it failed within the autorest , not in the azure-validator, could you please file a issue to autorest ? |
@jianyexi sure - am I supposed to file the issue here: https://github.com/Azure/autorest? Also, why does the azure-validator (and the validation gates in general, I guess) use AutoRest core version 2.x, instead of 3.x? |
Yes, because the autorest v3 has many breaking changes against v2, we can't upgrade it to v3 |
I see, that's unfortunate. I've opened up an issue, I'll close this one |
Also to temporarily side-step this issue, I'm going to remove the reference to Identity from ResourceModelWithAllowedPropertySet in the PR. |
PR in question: #15439
LintDiff Logs in question: https://github.com/Azure/azure-rest-api-specs/pull/15439/checks?check_run_id=3333578400
Fails with:
"Text": "Error: '$.definitions.Identity.properties.type.enum' has incompatible values (---\n- SystemAssigned\n- 'SystemAssigned,UserAssigned'\n- UserAssigned\n- None\n, ---\n- SystemAssigned\n)."
The issue lies in machineLearningServices' ResourceIdentityType enum sharing the same name as common-types' ResourceIdentityType enum. However, common-types' Identity definition is not referenced (neither directly not indirectly) anywhere in any of the specs defined in the readme.md. Interestingly, removing the reference to Identity from ResourceModelWithAllowedPropertySet resolves this issue. ResourceModelWithAllowedPropertySet is not referenced in any of the specs.
Running the validation command with
--v3
(which uses AutoRest core version^3.2.0
, as opposed to AutoRest core version~2.0.4413
) does not produce this failure.Because of these reasons, I think this might be an issue with autorest core version
~2.0.4413
.~2.0.4413
is used in the LintDiff pipeline. The client generation gates also does not seem to use a 3.x version, as they are failing with the same issue.The text was updated successfully, but these errors were encountered: