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

Notify the user when their settings will be ignored #24077

Open
PinkaminaDianePie opened this issue May 4, 2024 · 3 comments
Open

Notify the user when their settings will be ignored #24077

PinkaminaDianePie opened this issue May 4, 2024 · 3 comments
Labels

Comments

@PinkaminaDianePie
Copy link

Problem

There are some cases when Prisma ignores the configs, provided by the user, but the user has no idea about that. For example, when Prisma runs on Netlify, it throws away anything the user specified in binaryTargets and downloads the query engine specified in the Prisma code.

Suggested solution

Print a warning in the terminal, notifying the user about that:

You are running Prisma in the Netlify. Your binaryTargets configs will be ignored. Please unset the NETLIFY variable if you need to install another engine for some reason: NETLIFY= yarn prisma generate

Alternatives

Get rid of such magic stuff altogether and just tell the users what kind of binaryTargets they should use for every platform, instead of doing it implicitly

@janpio
Copy link
Member

janpio commented May 6, 2024

Are there any other cases than us making sure the app works when deployed to Netlify?

@PinkaminaDianePie
Copy link
Author

Deploying to other targets from Netlify's CI, like Cloudflare's edge functions, AWS lambdas and so on. Took me a lot of time to understand why Prisma silently ignores the binaryTargets.

@janpio
Copy link
Member

janpio commented May 7, 2024

Interesting. Can you open a new issue where you formulate that as a bug?
I think we were not aware of this use case, so never considered this to be a problem.

@Druue Druue added kind/feature A request for a new feature. team/schema Issue for team Schema. topic: deployment/netlify topic: binaryTargets labels May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants