Hi :wave: We’re using pulumi automation on Typesc...
# azure
d
Hi 👋 We’re using pulumi automation on Typescript. I recently added the
@pulumi/azure-native
package to our micro-service and its lint and build started to break on memory limits. After doing some inspection, I realized that before the addition,
tsc
analyzed about 8k files and after it, more than 35k(!), all additions are from the imported package of course. We tried all the standards actions like doing explicit imports, excluding that package from
tsconfig.json
and more of that kind. Did anyone encountered such an issue as well? Any ideas how to handle it? thanks 🙏
v
Hi! I have published separate packages for each of the submodules of Azure Native under the @kengachu-pulumi organization on npm. There you can pick and choose the specific parts you would like. https://github.com/Ankvi/pulumi-azure-native https://www.npmjs.com/package/@kengachu-pulumi/azure-native-core The documentation is a bit lacking (because of course) but I would like to rectify that soon enough
d
Thanks @victorious-musician-62050, I’ll have a look. While we found a workaround, it is still consuming a lot of memory which degrades the development experience dramatically. This is what we did. Added to the
tsconfig.eslint.ts
the following entry:
Copy code
"compilerOptions": {
    "paths": {
      "@pulumi/*": [
        "./index.ts"
      ]
    }
  }
v
By only adding the packages we needed we were able to go from tsserver not being able to finish analysing the project at all to finishing the analyzation in about 2 seconds. It also completely fixed our deployments in github runners. We were struggling with deployments with a simple Cosmosdb and some kubernetes resources taking 10 minutes or just all out failing. Now our deployments are 60% waiting for pnpm to install, the deployment itself is around 15 seconds if the only changes are the kubernetes image
n
@victorious-musician-62050 how did you only add the package you needed? Change your imports and rely on tree shaking or some other trick? Our IaC is completely unusable with azure native right now
v
I completely separated them into different npm packages. That way each one is just a few KB. I updated the main README of the project to show an example
n
Ah gotcha, thanks