Skip to content

Commit

Permalink
[WIP]: Fix datasource URL override for c-abi engine
Browse files Browse the repository at this point in the history
  • Loading branch information
SevInf committed May 10, 2024
1 parent 482e329 commit 2ddbae8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions query-engine/query-engine-c-abi/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,15 @@ impl QueryEngine {

let datamodel = get_cstr_safe(constructor_options.datamodel).expect("Datamodel must be present");
let mut schema = psl::validate(datamodel.into());

config

Check failure on line 137 in query-engine/query-engine-c-abi/src/engine.rs

View workflow job for this annotation

GitHub Actions / test

cannot find value `config` in this scope

Check failure on line 137 in query-engine/query-engine-c-abi/src/engine.rs

View workflow job for this annotation

GitHub Actions / Windows engines build on branch refs/heads/fix/ds-url-rn for commit 2ddbae8d42c8967473fa5f3cf3b8f33a52956be7

cannot find value `config` in this scope
.resolve_datasource_urls_query_engine(
&overrides,
|key| env.get(key).map(ToString::to_string),
// constructor_options.ignore_env_var_errors,
true,
)
.map_err(|err| ApiError::conversion(err, schema.db.source_assert_single()))?;
// extract the url for later use in apply_migrations
let url = schema
.configuration
Expand All @@ -155,15 +164,6 @@ impl QueryEngine {
_ => tracing::trace!("No base path provided"),
}

config
.resolve_datasource_urls_query_engine(
&overrides,
|key| env.get(key).map(ToString::to_string),
// constructor_options.ignore_env_var_errors,
true,
)
.map_err(|err| ApiError::conversion(err, schema.db.source_assert_single()))?;

config
.validate_that_one_datasource_is_provided()
.map_err(|errors| ApiError::conversion(errors, schema.db.source_assert_single()))?;
Expand Down

0 comments on commit 2ddbae8

Please sign in to comment.