-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[Apple][TvOS][JsonSchemaExporter] Generated schema does not match the expected specification #103694
Comments
Tagging subscribers to 'os-tvos': @vitek-karas, @kotlarmilos, @ivanpovazan, @steveisok, @akoeplinger |
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis |
Could it be related to #103322 @eiriktsarpalis ? |
Here is the diff between expected and actual documents: It would seem that custom attributes on the declaring type are being returned in an unexpected order for the case of mono, which is correspondingly changing the order of derived types in the I can't think of a good way to fix the test other than temporarily disabling it in mono. @vitek-karas @lewing is the attribute ordering a known issue and do you have any alternative suggestions? |
I don't think the custom attributes APIs guarantee a particular order. The order could change even for CoreCLR from one release to the next. The Json schema exporter should order the custom attribute values into a deterministic order if that is important. Otherwise the schema comparison operation in the testsuite should allow for |
Removing platform labels - the test failed on tvOS/arm64, but the behavior is undefined by any runtime and the test/product should not rely on it anywhere. |
The issue fundamentally is that we don't have the tools to check if two schemas are equivalent, so we have to resort to syntactic comparison (related: json-schema-org/json-schema-spec#474). At the same time, enforcing determinism by sorting items on the product side is a step in the wrong direction since it negatively impacts human readability in the majority of runtimes that do happen to report attributes in the order of declaration. I would be inclined to just disable the test in the impacted runtime at this stage. |
Build Information
Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=709161
Build error leg or test failing: System.Text.Json.Tests
Affected CI:
tvos_arm64_release_allsubsets_mono
(runtime-extra-platforms
)Range of commits: 7e9cab2...4834a50
Error Message
Fill the error message using step by step known issues guidance.
Full error message:
Known issue validation
Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=709161
Error message validated:
[[FAIL] System.Text.Json.Schema.Tests.JsonSchemaExporterTests_Reflection.TestTypes_GeneratesExpectedJsonSchema
]Result validation: ❌ Known issue did not match with the provided build.
Validation performed at: 6/19/2024 10:40:07 AM UTC
Report
Summary
The text was updated successfully, but these errors were encountered: