GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-nodejs
Ability to run cloud function that uses yarn 2 plug and play mode without invoking yarn.
- Lenguaje dominante
- TypeScript
- Estrellas
- 1.4k
- Forks
- 181
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
We experience about 2x memory usage when using cloud function in yarn 2 plug and play, zero install mode.
- in https://github.com/yarnpkg/berry/discussions/2884#discussioncomment-728054 people elaborate that using sometehing like `node -r ./.pnp.cjs ...` without calling yarn directly should help mitigate this problem.
- [google cloud buildpack doc](https://cloud.google.com/docs/buildpacks/nodejs#application_entrypoint) mentions following:
> We recommend using a Procfile because it takes npm or yarn out of the path.
This makes me think that maybe, it should be somehow possible to alter default ` /bin/bash -c yarn functions-framework` command into something more yarn pnp friendly, possibly by providing some form of custom procfile in the code deployed?
Alternatively - maybe there is some other issue in zero install mode? we do have workspace-tools plugin installed, and verified that `yarn workspaces focus --all --production` gets called during cloud function build process.
Guía de contribución
Línea de trabajo
Comienza revisando el comando predeterminado `/bin/bash -c yarn functions-framework` y la guía del buildpack de Google Cloud sobre el punto de entrada de la aplicación, incluido el enfoque de Procfile. El issue estará completo cuando una función de Cloud Yarn 2 Plug'n'Play desplegada pueda ejecutarse sin invocar Yarn y evite el uso adicional de memoria reportado.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- google-cloud, nodejs, typescript
- Área
- backend, cloud
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 28/100