mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
fix: AI Notebook CH connections need to send pw (#1792)
A user reported that they could not use the Notebooks feature due to a random clickhouse connection failure, pointing to a bad password. https://discord.com/channels/1149498480893640706/1149500035403350036/1473446917198315563 The reason it failed was because we weren't selecting the pw in `mongo` prior to using it in a direct `CH` connection. Before the fix, the call in `getAIMetadata` omitted the `selectPassword` argument: `const connection = await getConnectionById(source.team.toString(), connectionId); // connection.password === undefined` So when the ClickhouseClient was constructed immediately after: ``` const clickhouseClient = new ClickhouseClient({ host: connection.host, username: connection.username, password: connection.password, }); ``` `connection.password` was undefined, and the ClickHouse client connected with no password — hence the authentication failure. The fix just adds `true` so the password is actually fetched from MongoDB and present in connection.password when the client is constructed.
This commit is contained in:
parent
cd2b7a7615
commit
5474409317
2 changed files with 6 additions and 0 deletions
5
.changeset/sour-feet-act.md
Normal file
5
.changeset/sour-feet-act.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@hyperdx/api": patch
|
||||
---
|
||||
|
||||
fix: AI Notebook CH connections need to send pw
|
||||
|
|
@ -78,6 +78,7 @@ export async function getAIMetadata(source: ISource) {
|
|||
const connection = await getConnectionById(
|
||||
source.team.toString(),
|
||||
connectionId,
|
||||
true,
|
||||
);
|
||||
|
||||
if (connection == null) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue