GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-nodejs
Ability to run cloud function that uses yarn 2 plug and play mode without invoking yarn.
- Langage dominant
- TypeScript
- Étoiles
- 1.4k
- Forks
- 181
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par examiner la commande par défaut `/bin/bash -c yarn functions-framework` et les indications du buildpack Google Cloud concernant le point d’entrée de l’application, notamment l’approche avec Procfile. L’issue est terminée lorsqu’une fonction cloud Yarn 2 Plug'n'Play déployée peut s’exécuter sans invoquer Yarn et évite l’utilisation mémoire supplémentaire signalée.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- google-cloud, nodejs, typescript
- Domaine
- backend, cloud
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 28/100