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
Remove the global caches for project files #12370
Conversation
Changelog[uncommitted] (2023-03-07)Bug Fixes
|
f737f03
to
d302359
Compare
d302359
to
e6e7b5e
Compare
Simple is smooth, smooth is fast :-) |
|
||
reloaded, err := s.workspace.StackSettings(ctx, stackName) | ||
assert.NoError(t, err) | ||
assert.Equal(t, stackConfig, reloaded) |
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.
Amusingly because of the old caching logic this just asserted that X=X
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.
🎉
var projectSingleton = &projectLoader{ | ||
internal: map[string]*Project{}, | ||
} |
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.
👍 Red code has no bugs
Merging per @Frassle's request. |
bors merge |
Build succeeded: |
Other than being the most recent, this picks up the change made in pulumi/pulumi#12370 which removes caching of project and stack files, which fixes #411. Signed-off-by: Michael Bridgen <mbridgen@pulumi.com>
Other than being the most recent, this picks up the change made in pulumi/pulumi#12370 which removes caching of project and stack files, which fixes #411. Signed-off-by: Michael Bridgen <mbridgen@pulumi.com>
* Update Pulumi SDK and base image to v3.57.1 Other than being the most recent, this picks up the change made in pulumi/pulumi#12370 which removes caching of project and stack files, which fixes #411. * Add entry for #422 to changelog --------- Signed-off-by: Michael Bridgen <mbridgen@pulumi.com>
Description
Fixes #12152
This caching was originally added in #6576 two years ago. It saved a lot of file access because the system was repeatedly calling into the workspace module to load and re-load project files. We've cleaned up the system code to instead load the project files once, and pass the loaded
workspace.Project
object down the callchain to other sites that need it, rather than each site searching and loading the project. As such removing these caches shouldn't regress performance.Checklist
make changelog
and committed thechangelog/pending/<file>
documenting my change