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

Microsoft.MachineLearningServices workspaces/computes: missing properties #954

Closed
1 task done
tfitzmac opened this issue Jul 12, 2022 · 1 comment · Fixed by #1020
Closed
1 task done

Microsoft.MachineLearningServices workspaces/computes: missing properties #954

tfitzmac opened this issue Jul 12, 2022 · 1 comment · Fixed by #1020
Assignees
Labels
bug Something isn't working inaccuracy

Comments

@tfitzmac
Copy link

Resource Type

Microsoft.MachineLearningServices workspaces/computes

Api Version

2022-02-01-preview

Issue Type

Missing property(s)

Other Notes

The objects that vary by ComputeType are missing properties. This issue doesn't exist in 2022-01-01-preview but is present in 2022-02-01-preview and 2022-05-01.

For example, if you look at ComputeInstance in 2022-02-01-preview, you see only ComputeType. However, if you Iook at 2022-01-01-preview, you see a properties object.

If you look at the REST API specification, you see the properties are still present.

Bicep Repro

No response

Confirm

  • I have searched this repository and have not found similar issue reports.
@jeskew
Copy link
Contributor

jeskew commented Aug 8, 2022

The root cause for this is that the generator's discriminated union parser assumes a certain pattern in Swagger that Microsoft.MachineLearningServices is no longer following for ComputeType.

Usually, a discriminated union will be expressed using a combination of inherited and inlined properties, with each branch of the union extending a common base type and defining its own properties inline. The parser has a boolean flag (includeBaseProperties) that controls whether inherited properties are included in the generated type, with the assumption being that this would exclude the common base type's properties while still capturing the branch-specific, inline properties. It looks like Microsoft.MachineLearningServices went from inlining branch-specific properties in version 2022-01-01-preview to inheriting them in 2022-02-01-preview.

I believe this issue could be addressed by passing more specific information about which base properties to exclude to the parser, though I will need to do some investigation and testing to make sure that changes effects would be localized to issues like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working inaccuracy
Projects
Archived in project
2 participants