Azure / azure-sdk-tools

Tools repository leveraged by the Azure SDK team.
MIT License
111 stars 176 forks source link

[BreakingChangeTool] Fails to report breaking change due to runtime exception #8310

Open raych1 opened 4 months ago

raych1 commented 4 months ago

This is the runtime exception reported in the spec PR.

Rule Message
Runtime Exception "new":"https://github.com/Azure/azure-rest-api-specs/blob/1628d55466662ec03975068d8ec9a7ea760b0474/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/vmware.json",
"old":"https://github.com/Azure/azure-rest-api-specs/blob/main/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/vmware.json",
"details":"incompatible properties : tags "
Rule Message
Runtime Exception "new":"https://github.com/Azure/azure-rest-api-specs/blob/1628d55466662ec03975068d8ec9a7ea760b0474/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/vmware.json",
"old":"https://github.com/Azure/azure-rest-api-specs/blob/main/specification/vmware/resource-manager/Microsoft.AVS/preview/2021-01-01-preview/vmware.json",
"details":"incompatible properties : tags "

@konrad-jamrozik , can you have a look if this is a known issue? We would like to understand the real breaking change for this GA version.

konrad-jamrozik commented 4 months ago

Related:

@raych1 this is an old PR so the error message doesn't provide exact offending line. The actual problem is likely similar to the one discussed here. That is: The breaking change tool internally uses AutoRest v2 and AutoRest v2 is unable to parse the OpenAPI spec, thus the tool cannot run and throws runtime exception. The "incompatible properties: tags" error means, on a high level, that OpenAPI spec tries to reconcile two separate definitions of tags and they are incompatible with each other.

I would recommend reproducing this problem with a newer PR to get a better error message. And also see the discussion above.

raych1 commented 4 months ago

@konrad-jamrozik , can we run this tool locally to compare the 2023-09-01 version with previous stable version? The reason is that the 2023-09-01 version is in main and any change to the spec won't trigger the expected comparison. See this PR I created for testing.

raych1 commented 4 months ago

@konrad-jamrozik , can we run this tool locally to compare the 2023-09-01 version with previous stable version? The reason is that the 2023-09-01 version is in main and any change to the spec won't trigger the expected comparison. See this PR I created for testing.

I can run the tool locally and output the diffs comparing to previous version.

konrad-jamrozik commented 4 months ago

@raych1 instructions here:

@mikeharder is investigating related, other issues of form incompatible properties.

konrad-jamrozik commented 4 months ago

Related: