-
Notifications
You must be signed in to change notification settings - Fork 41
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
Improve examples cache #1717
Improve examples cache #1717
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
I'd be comfortable disabling gosec
. I'm struggling to think of a case where it flagged an error for us.
pkg/tfgen/docs.go
Outdated
if cliConverterEnabled() { | ||
cache := g.getOrCreateExamplesCache() | ||
if r, ok := cache.Lookup(hclCode, languageName); ok { | ||
convertedHcl = r |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we not returning here because we want g.coverageTracker.languageConversionSuccess(e, languageName, convertedHcl)
to trigger later down?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right. Looks like this results in a redundant cache.Store call. I can fix that up.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1717 +/- ##
==========================================
- Coverage 59.62% 59.21% -0.41%
==========================================
Files 299 307 +8
Lines 41918 42403 +485
==========================================
+ Hits 24993 25109 +116
- Misses 15492 15860 +368
- Partials 1433 1434 +1 ☔ View full report in Codecov by Sentry. |
This should fix failures like pulumi/pulumi-akamai#476 and pulumi/pulumi-newrelic#689. The full list of failures is https://github.com/search?q=org%3Apulumi+Update+GitHub+Actions+workflows.+is%3Aopen+AND+NOT+in%3Atitle+%22Bump+%22&type=pullrequests. Originally removed in #1717.
Fleshing out the examples cache a bit. With the introduction of PULUMI_CONVERT=1 the build times are making large providers like AWS very unpleasant to work with. In particular examples are being re-rendered repeatedly across
make tfgen
andmake build_sdks
as well as across multiple passes through the provider. This PR improves pre-existing examples cache a bit with the following goals in mind: