Skip to content

Conversation

@BrandonFreeman-Cavallo
Copy link
Contributor

Check List

  • Tests have been run in packages where changes made if available
  • Linter has been run for changed code
  • Tests for the changes have been added if not covered yet
  • Docs have been added / updated if required

We use clickhouse and tried to upgrade cube past v1.1.6. It appears that the internal driver has changed, and a problem was introduced where the config for protocol was coalescing to https regardless of passed parameter. It needed some parenthesis to be accurate.

Broke:

const config = {};
config.protocol = 'http';

const protocol =
  config.protocol ?? getEnv('dbSsl', { dataSource }) ? 'https:' : 'http:';

console.log(protocol);

// out 'https:'

Fixed:

const config = {};
config.protocol = 'http';

const protocol =
  config.protocol ?? (getEnv('dbSsl', { dataSource }) ? 'https:' : 'http:');

console.log(protocol);

// out 'http:'

@BrandonFreeman-Cavallo BrandonFreeman-Cavallo requested a review from a team as a code owner February 6, 2025 15:55
@github-actions github-actions bot added the pr:community Contribution from Cube.js community members. label Feb 6, 2025
@igorlukanin
Copy link
Member

@mcheshkov Could you please take a quick look (and approve if this looks good)?

@KSDaemon KSDaemon self-assigned this Mar 7, 2025
Copy link
Member

@KSDaemon KSDaemon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻 Thnx for the fix!

@KSDaemon KSDaemon changed the title fix: Allow config http protocol to be passed to clickhouse driver. fix(clickhouse-driver): Allow config http protocol to be passed to the driver. Mar 7, 2025
@KSDaemon KSDaemon merged commit 0c15b01 into cube-js:master Mar 10, 2025
46 checks passed
marianore-muttdata pushed a commit to MuttData/cube that referenced this pull request Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:community Contribution from Cube.js community members.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants