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

[Bug][TCGC]: Arm LRO library models are not included in sdkPackage.models #1530

Closed
4 tasks done
archerzz opened this issue Sep 12, 2024 · 1 comment · Fixed by #1887
Closed
4 tasks done

[Bug][TCGC]: Arm LRO library models are not included in sdkPackage.models #1530

archerzz opened this issue Sep 12, 2024 · 1 comment · Fixed by #1887
Assignees
Labels
bug Something isn't working lib:tcgc Issues for @azure-tools/typespec-client-generator-core library

Comments

@archerzz
Copy link
Member

Describe the bug

See the discussion: #1515 (comment)

Even we set filter-out-core-models: false, some Arm LRO library models are not included in sdkPakcage.models, like ArmOperationStatusResourceProvisioningState.

Reproduction

Parse an LRO operation defined by ARM LRO template. Check the sdkPakcage.models with configuration filter-out-core-models: false. You can find an example in the link above.

Checklist

  • Follow our Code of Conduct
  • Check that this issue is about the Azure libraries for typespec. For bug in the typespec language or core libraries file it in the TypeSpec repo
  • Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.
@archerzz archerzz added bug Something isn't working lib:tcgc Issues for @azure-tools/typespec-client-generator-core library labels Sep 12, 2024
@tadelesh tadelesh self-assigned this Sep 23, 2024
@tadelesh
Copy link
Member

the full lro logic should be considered when handling tcgc models. will be resolved when consolidating models and operations conversion logic.

@tadelesh tadelesh assigned ArcturusZhang and unassigned tadelesh Nov 7, 2024
github-merge-queue bot pushed a commit that referenced this issue Dec 4, 2024
…RO (#1887)

Remove this workaround since #311 is closed.
Fixes #1752
Fixes #1530

This PR adds three new usage flags: `LroInitial`, `LroPolling`,
`LroFinalEnvelope`.
These new usage flags are previously represented by `Output`, now the
`Output` flag no longer contain the semantics of these usages.
Therefore, if a model's usage is only `LroInitial`, this means it is
only used as the initial response of an LRO.
if a model has both `LroInitial` and `Output`, this means it is used as
the initial response of an LRO, and it also used as a normal output in
other places.
The final result will not have above new usages unless it participates
as those roles as well. It will have output usage.
markcowl pushed a commit to markcowl/typespec-azure that referenced this issue Dec 5, 2024
…RO (Azure#1887)

Remove this workaround since Azure#311 is closed.
Fixes Azure#1752
Fixes Azure#1530

This PR adds three new usage flags: `LroInitial`, `LroPolling`,
`LroFinalEnvelope`.
These new usage flags are previously represented by `Output`, now the
`Output` flag no longer contain the semantics of these usages.
Therefore, if a model's usage is only `LroInitial`, this means it is
only used as the initial response of an LRO.
if a model has both `LroInitial` and `Output`, this means it is used as
the initial response of an LRO, and it also used as a normal output in
other places.
The final result will not have above new usages unless it participates
as those roles as well. It will have output usage.
iscai-msft pushed a commit that referenced this issue Dec 6, 2024
…RO (#1887)

Remove this workaround since #311 is closed.
Fixes #1752
Fixes #1530

This PR adds three new usage flags: `LroInitial`, `LroPolling`,
`LroFinalEnvelope`.
These new usage flags are previously represented by `Output`, now the
`Output` flag no longer contain the semantics of these usages.
Therefore, if a model's usage is only `LroInitial`, this means it is
only used as the initial response of an LRO.
if a model has both `LroInitial` and `Output`, this means it is used as
the initial response of an LRO, and it also used as a normal output in
other places.
The final result will not have above new usages unless it participates
as those roles as well. It will have output usage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lib:tcgc Issues for @azure-tools/typespec-client-generator-core library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants