-
Notifications
You must be signed in to change notification settings - Fork 3
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
Modules referenced in parent directories cause resource issues/errors #194
Comments
Notes: If I exit the program and do not generate the pp files into a tempdir before running binding/conversion it converts from terraform just fine. The issue is in our binding (perhaps in fetching/converting deps). Here is the pcl project code which results in an oom if trying to convert it to anything (even just into pcl again!) https://drive.google.com/open?id=1-2zY0BuTO3tTYeX7Ij6rbVZmat5b7_VV&usp=drive_fs |
… their source (#17538) ### Description Recently we have been encountering out of memory errors when trying to convert terraform modules. Found out that the problem is two-fold: - pulumi-terraform-converter rewriting `module example "../../"` (tf) into `component example "./."` (pcl) - we try to bind component `example` but it reads its source from the same directory as the program of the component, causing an infinite recursion. This PR fixes part 2 of the issue, erroring out if the component's source is the same as the current binder directory path. Partially addresses pulumi/pulumi-converter-terraform#194 we still need to fix part 1 on the converter side of things
As described in pulumi/pulumi#17538, the problem was not really a memory leak but rather an infinite recursion because of the the CLI didn't check if a component was binding the same directory it was in and the converter is unable to convert referenced modules that live outside of its entry point. Consider this structure:
if you were running the converter from module first_example {
source "../.."
} then we fail to convert the top-level module because the the destination directory starts at |
As Zaid mentioned, #17538 fixes the out of resources issue but now has the following error:
So the next step is to execute the copying Zaid mentioned the parent module dirs. |
Since @Zaid-Ajaj is handling the circular dep issue I'll assign this to you for tracking purposes |
What happened?
When convertering
the program executes until it is killed by the OS for consuming too much memory.
Upon profiling, increasing memory pressure on the heap can be observed, indicating a memory leak.
trace
(open with
go tool pprof -http :8080 FILE
)Example
NA
Output of
pulumi about
NA
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
This is a related bug to #21
The text was updated successfully, but these errors were encountered: