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

qe: repair OVERWRITE_DATASOURCES param in binary CLI #3203

Merged
merged 1 commit into from Sep 20, 2022

Conversation

tomhoule
Copy link
Contributor

What happened:

  • We introduced psl::ValidatedSchema in the QE. Unlike parse_dml(), it does not throw away the configuration part of the schema.
  • We started using the configuration from the ValidatedSchema instead of calling psl::parse_configuration() on the same schema again through Opts::configuration(). That saved work and code.
  • The logic about ignoring env vars, which is coupled to the logic for overriding datasource URLs, suddenly was out of the code paths.
  • We were not overriding the datasource URLs anymore. That made the client tests fail in non-obvious ways in prisma/prisma.

How this commit fixes it:

  • Opts::schema() now takes the same ignore_env_var_errors param as Opts::configuration() and overrides datasource urls in the same way.

It may be worth revisiting this whole mechanism later, but this should fix prisma/prisma integration for now.

What happened:

- We introduced psl::ValidatedSchema in the QE. Unlike `parse_dml()`, it
  does not throw away the configuration part of the schema.
- We started using the configuration from the ValidatedSchema instead of
  calling `psl::parse_configuration()` on the same schema again through
  `Opts::configuration()`. That saved work and code.
- The logic about ignoring env vars, which is coupled to the logic for
  overriding datasource URLs, suddenly was out of the code paths.
- We were not overriding the datasource URLs anymore. That made the
  client tests fail in non-obvious ways in prisma/prisma.

How this commit fixes it:

- `Opts::schema()` now takes the same `ignore_env_var_errors` param as
  `Opts::configuration()` and overrides datasource urls in the same way.

It may be worth revisiting this whole mechanism later, but this should
fix prisma/prisma integration for now.
@tomhoule tomhoule added this to the 4.4.0 milestone Sep 19, 2022
@tomhoule tomhoule merged commit f71b104 into main Sep 20, 2022
@tomhoule tomhoule deleted the integration/qe/repair-overwrite-datasource branch September 20, 2022 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants