feat!: remove env loading and dotenv support - #28298
Merged
Merged
Conversation
aqrln
force-pushed
the
push-svxonmzrnypx
branch
2 times, most recently
from
October 15, 2025 15:58
caaf79d to
54a5298
Compare
aqrln
force-pushed
the
push-svxonmzrnypx
branch
from
October 30, 2025 10:31
54a5298 to
d0f5cde
Compare
aqrln
force-pushed
the
push-svxonmzrnypx
branch
2 times, most recently
from
October 30, 2025 15:57
3903ff1 to
fbc8b8e
Compare
Contributor
size-limit report 📦
|
aqrln
force-pushed
the
push-svxonmzrnypx
branch
9 times, most recently
from
October 31, 2025 16:06
66f6069 to
7ae4a5e
Compare
aqrln
marked this pull request as ready for review
October 31, 2025 16:06
aqrln
force-pushed
the
push-svxonmzrnypx
branch
from
October 31, 2025 16:07
7ae4a5e to
a3e2fac
Compare
aqrln
force-pushed
the
push-rltyqkkoomox
branch
from
October 31, 2025 16:07
014debd to
98db971
Compare
aqrln
added a commit
to prisma/prisma-engines
that referenced
this pull request
Oct 31, 2025
aqrln
force-pushed
the
push-svxonmzrnypx
branch
from
October 31, 2025 17:33
a3e2fac to
9881e1e
Compare
aqrln
added a commit
to prisma/prisma-engines
that referenced
this pull request
Nov 3, 2025
/prisma-branch push-svxonmzrnypx Ref: prisma/orm#28298 Ref: https://linear.app/prisma-company/issue/TML-1459/remove-processenv-loading-from-prismaclient Ref: https://linear.app/prisma-company/issue/TML-1545/remove-url-datasource-attribute-from-psl
jacek-prisma
reviewed
Nov 3, 2025
jacek-prisma
approved these changes
Nov 3, 2025
jacek-prisma
left a comment
Contributor
There was a problem hiding this comment.
lgtm with one very minor comment
aqrln
force-pushed
the
push-svxonmzrnypx
branch
from
November 3, 2025 11:11
9881e1e to
7b05f37
Compare
aqrln
added a commit
to prisma/prisma-engines
that referenced
this pull request
Nov 3, 2025
Don't load or validate the `url` attribute from the `datasource` block in `get_config`. It isn't fully removed yet, but it is now essentially ignored everywhere except Query Engine. Ref: prisma/orm#28298 Ref: https://linear.app/prisma-company/issue/TML-1459/remove-processenv-loading-from-prismaclient Ref: https://linear.app/prisma-company/issue/TML-1545/remove-url-datasource-attribute-from-psl /prisma-branch push-svxonmzrnypx
Since there's no `env()` in PSL anymore, we don't need to load environment variables in Prisma Client. But we also wanted to remove this logic regardless and have people load their environment variables themselves, as it shouldn't be Prisma's responsibility and Prisma shouldn't be mutating `process.env`. This is already the case for the new generator, now we remove this completely. Ref: https://linear.app/prisma-company/issue/TML-1459/remove-processenv-loading-from-prismaclient Ref: https://linear.app/prisma-company/issue/TML-1340/remove-env-from-psl Closes: https://linear.app/prisma-company/issue/TML-309/fix-leaky-env-logic-→-stop-mutating-processenv
aqrln
force-pushed
the
push-svxonmzrnypx
branch
from
November 3, 2025 12:09
7b05f37 to
339f36b
Compare
aqrln
added a commit
that referenced
this pull request
Nov 5, 2025
aqrln
added a commit
to prisma/prisma-engines
that referenced
this pull request
Nov 17, 2025
Don't load or validate the `url` attribute from the `datasource` block in `get_config`. It isn't fully removed yet, but it is now essentially ignored everywhere except Query Engine. Ref: prisma/orm#28298 Ref: https://linear.app/prisma-company/issue/TML-1459/remove-processenv-loading-from-prismaclient Ref: https://linear.app/prisma-company/issue/TML-1545/remove-url-datasource-attribute-from-psl /prisma-branch push-svxonmzrnypx
aqrln
added a commit
to prisma/prisma-engines
that referenced
this pull request
Nov 17, 2025
Don't load or validate the `url` attribute from the `datasource` block in `get_config`. It isn't fully removed yet, but it is now essentially ignored everywhere except Query Engine. Ref: prisma/orm#28298 Ref: https://linear.app/prisma-company/issue/TML-1459/remove-processenv-loading-from-prismaclient Ref: https://linear.app/prisma-company/issue/TML-1545/remove-url-datasource-attribute-from-psl /prisma-branch push-svxonmzrnypx
aqrln
added a commit
to prisma/prisma-engines
that referenced
this pull request
Nov 17, 2025
Don't load or validate the `url` attribute from the `datasource` block in `get_config`. It isn't fully removed yet, but it is now essentially ignored everywhere except Query Engine. Ref: prisma/orm#28298 Ref: https://linear.app/prisma-company/issue/TML-1459/remove-processenv-loading-from-prismaclient Ref: https://linear.app/prisma-company/issue/TML-1545/remove-url-datasource-attribute-from-psl /prisma-branch push-svxonmzrnypx
aqrln
added a commit
that referenced
this pull request
Nov 17, 2025
Since Prisma Client won't be aware of connection strings anymore (except when using Accelerate), this logic is mostly obsolete. We wanted to remove loading `dotenv` regardless, and have people load their environment variables themselves, as it shouldn't be Prisma's responsibility and Prisma shouldn't be mutating `process.env`. However, this PR takes it one step further, and disables evaluating and validating the value of `env()` for the `url` property in PSL altogether (except in `LibraryEngine`, where the environment variables are still passed to the engine). Ref: prisma/prisma-engines#5681 Ref: https://linear.app/prisma-company/issue/TML-1459/remove-processenv-loading-from-prismaclient Closes: https://linear.app/prisma-company/issue/TML-309/fix-leaky-env-logic-→-stop-mutating-processenv Closes: #19519
aqrln
added a commit
that referenced
this pull request
Nov 17, 2025
aqrln
added a commit
that referenced
this pull request
Nov 17, 2025
Since Prisma Client won't be aware of connection strings anymore (except when using Accelerate), this logic is mostly obsolete. We wanted to remove loading `dotenv` regardless, and have people load their environment variables themselves, as it shouldn't be Prisma's responsibility and Prisma shouldn't be mutating `process.env`. However, this PR takes it one step further, and disables evaluating and validating the value of `env()` for the `url` property in PSL altogether (except in `LibraryEngine`, where the environment variables are still passed to the engine). Ref: prisma/prisma-engines#5681 Ref: https://linear.app/prisma-company/issue/TML-1459/remove-processenv-loading-from-prismaclient Closes: https://linear.app/prisma-company/issue/TML-309/fix-leaky-env-logic-→-stop-mutating-processenv Closes: #19519
aqrln
added a commit
that referenced
this pull request
Nov 17, 2025
aqrln
added a commit
that referenced
this pull request
Nov 17, 2025
Since Prisma Client won't be aware of connection strings anymore (except when using Accelerate), this logic is mostly obsolete. We wanted to remove loading `dotenv` regardless, and have people load their environment variables themselves, as it shouldn't be Prisma's responsibility and Prisma shouldn't be mutating `process.env`. However, this PR takes it one step further, and disables evaluating and validating the value of `env()` for the `url` property in PSL altogether (except in `LibraryEngine`, where the environment variables are still passed to the engine). Ref: prisma/prisma-engines#5681 Ref: https://linear.app/prisma-company/issue/TML-1459/remove-processenv-loading-from-prismaclient Closes: https://linear.app/prisma-company/issue/TML-309/fix-leaky-env-logic-→-stop-mutating-processenv Closes: #19519
aqrln
added a commit
that referenced
this pull request
Nov 17, 2025
aqrln
added a commit
to prisma/prisma-engines
that referenced
this pull request
Nov 17, 2025
Don't load or validate the `url` attribute from the `datasource` block in `get_config`. It isn't fully removed yet, but it is now essentially ignored everywhere except Query Engine. Ref: prisma/orm#28298 Ref: https://linear.app/prisma-company/issue/TML-1459/remove-processenv-loading-from-prismaclient Ref: https://linear.app/prisma-company/issue/TML-1545/remove-url-datasource-attribute-from-psl /prisma-branch push-svxonmzrnypx
Aijeyomah
pushed a commit
to Aijeyomah/prisma-engines
that referenced
this pull request
Jan 26, 2026
Don't load or validate the `url` attribute from the `datasource` block in `get_config`. It isn't fully removed yet, but it is now essentially ignored everywhere except Query Engine. Ref: prisma/orm#28298 Ref: https://linear.app/prisma-company/issue/TML-1459/remove-processenv-loading-from-prismaclient Ref: https://linear.app/prisma-company/issue/TML-1545/remove-url-datasource-attribute-from-psl /prisma-branch push-svxonmzrnypx
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since Prisma Client won't be aware of connection strings anymore (except when using Accelerate), this logic is mostly obsolete.
We wanted to remove loading
dotenvregardless, and have people load their environment variables themselves, as it shouldn't be Prisma's responsibility and Prisma shouldn't be mutatingprocess.env. However, this PR takes it one step further, and disables evaluating and validating the value ofenv()for theurlproperty in PSL altogether (except inLibraryEngine, where the environment variables are still passed to the engine).Ref: prisma/prisma-engines#5681
Ref: https://linear.app/prisma-company/issue/TML-1459/remove-processenv-loading-from-prismaclient
Closes: https://linear.app/prisma-company/issue/TML-309/fix-leaky-env-logic-→-stop-mutating-processenv
Closes: #19519