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

Commits on Sep 19, 2022

  1. qe: repair OVERWRITE_DATASOURCES param in binary CLI

    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 committed Sep 19, 2022
    Copy the full SHA
    8ac7ec8 View commit details
    Browse the repository at this point in the history