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

Fix snippet generation pipeline. #1719

Merged
merged 2 commits into from
Aug 17, 2023
Merged

Conversation

andrueastman
Copy link
Member

This PR fixes the timing out of the snippet generation pipeline caused by the error in the metadata capture in microsoft/OpenAPI.NET.OData#414

In summary, changes include

  • Trace out errors in the openApi metadata(similar to Kiota) rather than throwing an InvalidOperationException to allow for generation where possible.
  • Updated SimpleLazy to only acquire the lock when uninitialized to prevent unnecessary waits/locks on reads increasing generation time..
  • Cache ISnippetsGenerator instances in the CodeSnippetsReflection.App to avoid multiple loads of the metadata increasing generation time.

Sample run can be found at here with generation time cut down to about 15mins from 40+ mins

@andrueastman andrueastman marked this pull request as ready for review August 17, 2023 14:32
@andrueastman andrueastman requested a review from a team as a code owner August 17, 2023 14:32
@andrueastman andrueastman enabled auto-merge (squash) August 17, 2023 14:32
@sonarcloud
Copy link

sonarcloud bot commented Aug 17, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

40.5% 40.5% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@andrueastman andrueastman merged commit 3d9a44a into dev Aug 17, 2023
28 of 29 checks passed
@andrueastman andrueastman deleted the andrueastman/snippetFetches branch August 17, 2023 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants