cube-js / cube-js/cube

Once driverFactory is configured extendContext cant access request headers

Open
#6,889 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Rust
Stars
20.8k
Forks
2.1k
Avg merge
1d 2h
Merged PRs (30d)
181

Description

**Describe the bug**
Once driverFactory is configured extendContext cant access request headers

**To Reproduce**
Steps to reproduce the behavior:
1. ive configured more then 1 datasource(in my case big query and postgres)
2. ive configured driverFactory as follows:
```
driverFactory: ({ dataSource }) => {
if (dataSource === 'default') {
return {
type: 'bigquery',
database: dataSource,
};
} else {
return {
type: 'postgres',
database: process.env[`${dataSource}_NAME`],
host: process.env[`${dataSource}_HOST`],
user: process.env[`${dataSource}_USER`],
password: process.env[`${dataSource}_PASS`],
port: process.env[`${dataSource}_PORT`],
};
}
}
```
3. try and query the none default datasource

**Expected behavior**
extendContext to still be able to access request's headers, every query started working with queryQueue after configuring driverFactory.

**Version:**
0.33.35

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.