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

[hidi] hidi transform can't be cancelled or aborted. Process needs to be killed manually. #884

Closed
MaximRouiller opened this issue May 31, 2022 · 2 comments · Fixed by #1108
Assignees
Labels
type:enhancement Enhancement request targeting an existing experience
Milestone

Comments

@MaximRouiller
Copy link
Member

MaximRouiller commented May 31, 2022

Steps to replicate

From the PowerShell command line, running the following command:

hidi transform -cs "https://graph.microsoft.com/v1.0/`$metadata" -f Yaml -o .\microsoft-graph.yaml -co

Microsoft.OpenAPI.Hidi.exe starts and consumes 25% CPU and memory usage starts increasing over 2GB. Tried to CTRL-C from the command line which would normally terminate the process. Memory usage continued climbing to ~6GB without completing.

Expected behavior

CTRL-C should abort the transformation process immediately or within a few seconds. Manually killing the Microsoft.OpenAPI.Hidi process should not be required.

Tool version

Package: microsoft.openapi.hidi
Version: 1.0.0-preview4

dotnet --info

❯ dotnet --info
.NET SDK (reflecting any global.json):
 Version:   6.0.300
 Commit:    8473146e7d

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.22000
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\6.0.300\

Host (useful for support):
  Version: 6.0.5
  Commit:  70ae3df4a6

.NET SDKs installed:
  3.1.419 [C:\Program Files\dotnet\sdk]
  5.0.214 [C:\Program Files\dotnet\sdk]
  5.0.408 [C:\Program Files\dotnet\sdk]
  6.0.300 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.25 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.25 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.25 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download
@darrelmiller darrelmiller added the type:enhancement Enhancement request targeting an existing experience label Jun 2, 2022
@darrelmiller
Copy link
Member

darrelmiller commented Jun 2, 2022

You will struggle to process the complete public metadata on Graph because there are a number of containment annotations that are lies for legacy reasons. Unfortunately the lies cause the size of the OpenAPI description to become massive. We have an XSLT that "fixes" the lies before processing for SDK generation. This is one reason that we publish our pre-generated OpenAPI description in the https://github.com/microsoftgraph/msgraph-metadata repo.

@MaximRouiller
Copy link
Member Author

Thanks for the workaround! Let's make sure that we still can "cancel" or "abort" any CLI commands we do. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement Enhancement request targeting an existing experience
Projects
None yet
3 participants