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

profile initialized as an empty array causing it fail to get !$(profile) configuration #4013

Closed
qiaozha opened this issue Mar 25, 2021 · 8 comments
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved.

Comments

@qiaozha
Copy link
Member

qiaozha commented Mar 25, 2021

Originally created here Azure/autorest.typescript#880

This cause typescript can't generate track2 SDK for resources RP without manually remove the !$(profile) yaml condition.

@qiaozha qiaozha added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Mar 25, 2021
@qiaozha
Copy link
Member Author

qiaozha commented Mar 25, 2021

@timotheeguerin @joheredi

@timotheeguerin
Copy link
Member

I think moving --profile to be an array was done as some work for multi api support where you'd be able to define a list of api you want to include. As this was disabled a long time ago I think we should be fine keeping profile as a single value. I have a pr changing that. Can you test that #4015 and confirm if this works

@timotheeguerin
Copy link
Member

So talked with Laurent about this issue and the thing is profile is an autorest v3 reserved configuration for built-in multi-api version(It is disabled now but could be enabled in the future).

Recommendation is to change the name of profile to something else that is not reserved.

@qiaozha
Copy link
Member Author

qiaozha commented Mar 29, 2021

I thought we are going to use batch for multi-api ?

@timotheeguerin
Copy link
Member

Autorest has this logic to define some profile and filter api version and only certain operations/resources. For that profiles and profile are reserved.

@qiaozha
Copy link
Member Author

qiaozha commented Apr 21, 2021

Just curious, in the multi-api scenario, Are you going to have something like min api, max api, as long as the version or version range defined in the profile within the min api and max api, then this operation/schema will show up in this profile ?
Also, we still need to handle non multi-api cases even if multi-api is supported in the future. I wonder what should we do to indicate some part are non multi-api ?

@timotheeguerin
Copy link
Member

timotheeguerin commented Apr 21, 2021

This logic was added early in autorest v3 design, it was shown problematic in its current design so it was disabled. There is no fixed plans to bring this back yet but those config keys will remain reserved for that potential come back. So can't confirm anything about the functionality but if we bring it back I'll take this into consideration.

@qiaozha
Copy link
Member Author

qiaozha commented Apr 22, 2021

I see. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants