Skip to content
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

Serverless deployments: Just making a schema level change to a repository does not invalidate node_modules cache that contains generated Client #7818

Closed
janpio opened this issue Jun 22, 2021 · 3 comments · Fixed by #18437
Milestone

Comments

@janpio
Copy link
Member

janpio commented Jun 22, 2021

This is more a theory than a bug report, but this could explain why sometimes deployments to Netlify and other deployment providers do not actually deploy a new schema.

Example: https://github.com/netlify/build-image/blob/d51b4da41df1087448804e27626a32d83f50380f/run-build-functions.sh#L184-L197 npm install is only run if the sha of package.json is different, which it does not have to be if you only updated your schema. No npm install means not post install hook, means no prisma generate.

We should get a better overview here by designing a few test setups, and testing them at a few of these potentially affected providers to see how they handle that.

@pantharshit00
Copy link
Contributor

Most platforms provide a manual postinstall hook which can be used as a workaround here.

@pantharshit00 pantharshit00 added the kind/improvement An improvement to existing feature and code. label Jul 25, 2021
@janpio
Copy link
Member Author

janpio commented Jul 28, 2021

We should find a way to trigger that automatically or tell affected users about this, to avoid general confusion. This is one of the cases where we do not get issues, as "just try it again" often makes it work in the eyes of the user.

@janpio janpio changed the title Just making a schema level change to a repository does not invalidate node_modules cache that contains generated Client Serverless deployments: Just making a schema level change to a repository does not invalidate node_modules cache that contains generated Client Dec 11, 2022
@millsp
Copy link
Member

millsp commented Feb 23, 2023

Related prisma/docs#3590

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants