Skip to content

Commit e8106e6

Browse files
YaroslavLitvinoveadgbear
authored andcommitted
in login request use database_name instead of warehouse (#277)
1 parent efaf81a commit e8106e6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

crates/nexus/src/http/dbt/handlers.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ pub async fn login(
6060
.await
6161
.context(dbt_error::ControlServiceSnafu)?;
6262

63-
for warehouse in warehouses.into_iter().filter(|w| w.name == query.warehouse) {
63+
debug!("login request query: {query:?}, databases: {warehouses:?}");
64+
for warehouse in warehouses
65+
.into_iter()
66+
.filter(|w| w.name == query.database_name)
67+
{
6468
// Save warehouse id and db name in state
6569
state.dbt_sessions.lock().await.insert(
6670
token.clone(),
@@ -128,7 +132,6 @@ pub async fn query(
128132
};
129133

130134
let sessions = state.dbt_sessions.lock().await;
131-
132135
let Some(_auth_data) = sessions.get(token.as_str()) else {
133136
return Err(DbtError::MissingDbtSession);
134137
};

0 commit comments

Comments
 (0)