Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
a10560b
Implement EventEmitter in Cube classes to make process eventdriven
H31nz3l Aug 8, 2024
9ee7e01
Implemented the socket-logic
H31nz3l Aug 9, 2024
e6ff679
implemented socket logic
H31nz3l Aug 9, 2024
d705ede
Revert "implemented socket logic"
H31nz3l Aug 9, 2024
a5a331c
Merge branch 'master' into websocket-event-driven
H31nz3l Aug 9, 2024
3d3f425
added check for changes
H31nz3l Aug 9, 2024
7922a25
minor changes
H31nz3l Aug 9, 2024
23cfdee
set pipe in class
H31nz3l Aug 9, 2024
0f9c4c2
Merge pull request #50 from xip-online-applications/websocket-event-d…
H31nz3l Aug 9, 2024
341c121
linting fixes
H31nz3l Aug 9, 2024
0501687
changed package.json to proper git
H31nz3l Aug 9, 2024
3655b38
bumb
H31nz3l Aug 9, 2024
56eb710
v0.35.68
H31nz3l Aug 9, 2024
d5e5193
Merge branch 'cube-js:master' into master
H31nz3l Aug 9, 2024
64acf02
changed name to our company name
H31nz3l Aug 9, 2024
a0be582
v0.35.69
H31nz3l Aug 9, 2024
cc4bea6
changed git url
H31nz3l Aug 9, 2024
fc47844
Revert "changed git url"
H31nz3l Aug 9, 2024
b66a46b
Revert "v0.35.69"
H31nz3l Aug 9, 2024
c16f101
Revert "changed name to our company name"
H31nz3l Aug 9, 2024
fda0748
Revert "v0.35.68"
H31nz3l Aug 9, 2024
8681798
Revert "bumb"
H31nz3l Aug 9, 2024
70231cb
Revert "changed package.json to proper git"
H31nz3l Aug 9, 2024
7defccc
github flow added
H31nz3l Aug 12, 2024
f9faa53
fixes workflow
H31nz3l Aug 12, 2024
3890552
workflow
H31nz3l Aug 12, 2024
8272e11
use own github wf
H31nz3l Aug 12, 2024
6c486c9
added repo
H31nz3l Aug 12, 2024
13f784f
fix yml
H31nz3l Aug 12, 2024
5ecd199
added yarn install to latest dockerfile
H31nz3l Aug 12, 2024
60052d3
fixes wf
H31nz3l Aug 12, 2024
0a358f7
minor docker file change
H31nz3l Aug 12, 2024
953ec68
revert minor change
H31nz3l Aug 12, 2024
15e212b
change docker
H31nz3l Aug 12, 2024
d8b4055
build fix?
H31nz3l Aug 12, 2024
6aba442
added additional logging
H31nz3l Aug 12, 2024
36b16c6
Added package
H31nz3l Aug 13, 2024
3ff9759
added logging
H31nz3l Aug 13, 2024
58a6c47
disabled some workflows
H31nz3l Aug 13, 2024
6788582
disabled some workflows
H31nz3l Aug 13, 2024
af993bc
build dev container
H31nz3l Aug 13, 2024
bde0727
build dev container
H31nz3l Aug 13, 2024
9fadcba
build dev container
H31nz3l Aug 13, 2024
87d92b4
build dev container
H31nz3l Aug 13, 2024
a785d30
build dev container
H31nz3l Aug 13, 2024
92668c7
build dev container
H31nz3l Aug 13, 2024
17f4d83
build dev container
H31nz3l Aug 13, 2024
397c876
build dev container
H31nz3l Aug 13, 2024
b88a028
build dev container
H31nz3l Aug 13, 2024
723474c
build dev container
H31nz3l Aug 14, 2024
9f9040e
build dev container
H31nz3l Aug 14, 2024
35ca78d
build dev container
H31nz3l Aug 14, 2024
f809a53
build dev container
H31nz3l Aug 14, 2024
e73db81
Merge pull request #55 from cube-js/master
H31nz3l Aug 15, 2024
6afc245
Merge branch 'refs/heads/merge-prep'
H31nz3l Aug 15, 2024
65d9187
build dev container
H31nz3l Aug 15, 2024
5efef86
update wf
H31nz3l Aug 15, 2024
eaf4e85
buildfix
H31nz3l Aug 15, 2024
a425aad
buildfix
H31nz3l Aug 15, 2024
646fb08
fix?
H31nz3l Aug 15, 2024
104d522
leaner container
H31nz3l Aug 15, 2024
e0bd43e
fix
H31nz3l Aug 15, 2024
83456d8
fix
H31nz3l Aug 15, 2024
fc0def0
minor change
H31nz3l Aug 15, 2024
95cd825
Added redis event emitter
H31nz3l Aug 15, 2024
4f7cbb1
Added redis event emitter
H31nz3l Aug 15, 2024
5d55c9b
Added redis event emitter
H31nz3l Aug 16, 2024
fca30e0
minor improvement
H31nz3l Aug 16, 2024
81f3daf
minor improvement
H31nz3l Aug 16, 2024
3df052d
minor improvement
H31nz3l Aug 16, 2024
098069e
minor improvement
H31nz3l Aug 16, 2024
1f17fc5
minor improvement
H31nz3l Aug 16, 2024
bb0ef47
Updated redis driver
H31nz3l Aug 16, 2024
0d12d84
Updated redis driver
H31nz3l Aug 16, 2024
633f8a7
Updated redis driver
H31nz3l Aug 16, 2024
108272a
Updated redis driver
H31nz3l Aug 16, 2024
15bbf30
removed logging
H31nz3l Aug 19, 2024
a498763
removed logging
H31nz3l Aug 19, 2024
2fa9573
removed logging
H31nz3l Aug 19, 2024
4d95e80
removed logging
H31nz3l Aug 19, 2024
a69ddfd
bugfix
H31nz3l Aug 19, 2024
689b8b7
bugfix
H31nz3l Aug 19, 2024
a2a7c60
added logging for development
H31nz3l Aug 26, 2024
dbf0dbb
Merge pull request #56 from cube-js/master
H31nz3l Aug 26, 2024
fbbf289
decreased timing
H31nz3l Aug 26, 2024
35b9f38
Handle all renew cube async
H31nz3l Aug 26, 2024
5521ffe
Minor change
H31nz3l Aug 26, 2024
1b9960d
Minor change
H31nz3l Aug 28, 2024
4a7c0f5
Minor change
H31nz3l Aug 28, 2024
033cdb6
Minor change
H31nz3l Aug 29, 2024
8108c3c
Minor change
H31nz3l Aug 29, 2024
41d9c8d
Minor change
H31nz3l Aug 29, 2024
2db8774
Minor change
H31nz3l Aug 29, 2024
e7e60c3
Minor change
H31nz3l Aug 29, 2024
330c7d1
Minor change
H31nz3l Aug 29, 2024
334a1b9
Minor change
H31nz3l Aug 29, 2024
f99cab4
Minor change
H31nz3l Aug 29, 2024
818923e
Minor change
H31nz3l Aug 29, 2024
62c2ed3
Merge pull request #57 from cube-js/master
H31nz3l Aug 29, 2024
586dee7
log-testje
H31nz3l Aug 30, 2024
bfdf418
ensure only cache is used for api refresh queries
H31nz3l Aug 30, 2024
419cd14
ensure only cache is used for api refresh queries
H31nz3l Aug 30, 2024
277384c
remove logging for no cache
H31nz3l Oct 24, 2024
4bdd62f
Merge branch 'cube-js:master' into merge-prep
H31nz3l Oct 30, 2024
21cad22
Merge branch 'refs/heads/merge-prep'
H31nz3l Oct 30, 2024
f23430a
Merge remote-tracking branch 'refs/remotes/origin/merge-prep'
H31nz3l Oct 30, 2024
2507921
build fix
H31nz3l Oct 30, 2024
74044ea
Merge pull request #64 from xip-online-applications/cube-transai-1.00
H31nz3l Oct 30, 2024
f865c8b
build fix
H31nz3l Oct 30, 2024
b327c18
build fix
H31nz3l Oct 30, 2024
289b4d0
build fix
H31nz3l Oct 30, 2024
256e676
build fix
H31nz3l Oct 30, 2024
5dcc4f3
Added logging
H31nz3l Oct 30, 2024
fe826b1
removed logging
H31nz3l Nov 12, 2024
30fb5a4
improved logging
H31nz3l Nov 12, 2024
cda927c
removed some logging
H31nz3l Nov 12, 2024
c166775
fix log
H31nz3l Nov 12, 2024
ca12eca
Merge pull request #66 from cube-js/master
H31nz3l Mar 28, 2025
0c05468
Merge branch 'merge-prep'
H31nz3l Mar 28, 2025
69d34b1
chore(yarn): update dependencies and versions in yarn.lock
H31nz3l Mar 28, 2025
7dcb147
Merge pull request #67 from xip-online-applications/release-1.2.27
H31nz3l Mar 28, 2025
2f1b94c
fix(PostgresQuery): add extra parentheses in convertTz method for cla…
H31nz3l Apr 1, 2025
26f8bdf
Merge remote-tracking branch 'origin/master'
H31nz3l Apr 1, 2025
8889145
Merge pull request #68 from cube-js/master
H31nz3l Apr 2, 2025
512ee87
Merge branch 'merge-prep'
H31nz3l Apr 2, 2025
728f0be
cube 1.2.28
H31nz3l Apr 2, 2025
b54180d
Merge pull request #69 from cube-js/master
H31nz3l Apr 4, 2025
9b57be5
Merge branch 'merge-prep'
H31nz3l Apr 4, 2025
cf5b3f4
Merge branch 'cube-js:master' into merge-prep
H31nz3l Jun 24, 2025
789aa08
Merge branch 'merge-prep'
H31nz3l Jun 24, 2025
7680c34
cube 1.3.24
H31nz3l Jun 24, 2025
4a53f88
Use LIKE instead of starts_with
frankdikker Jul 21, 2025
c854c5e
Merge pull request #71 from xip-online-applications/use-like-instead-…
H31nz3l Jul 21, 2025
828de18
Merge branch 'cube-js:master' into merge-prep
H31nz3l Oct 6, 2025
0426b96
Merge branch 'merge-prep'
H31nz3l Oct 6, 2025
e6d4ef3
cube 1.3.78
H31nz3l Oct 6, 2025
83b09ae
When we know the timezone, apply it
frankdikker Oct 28, 2025
55298ac
When we know the timezone, apply it
frankdikker Oct 28, 2025
59503da
When we know the timezone, apply it
frankdikker Oct 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
33 changes: 33 additions & 0 deletions .github/workflows/wf-cube.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
push:
branches:
- master

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
tag: 'transcube-${{ github.sha }}'

jobs:
build-and-push-image:
name: Build Latest - TransAI Cube
runs-on: ubuntu-latest

permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Copy yarn.lock file
run: cp yarn.lock packages/cubejs-docker
- name: Build & push
uses: xip-online-applications/gha-workflow-templates/ghcr-build-push@main
with:
repository: '${{ github.repository }}/cube'
tag: ${{ env.tag }}
context: ./
dockerfile: ./packages/cubejs-docker/transai.Dockerfile
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"lint:fix": "lerna run lint:fix",
"tsc": "tsc --build",
"tsc:watch": "tsc --build --watch",
"clean": "rimraf packages/*/{tsconfig.tsbuildinfo,lib,dist}"
"clean": "rimraf packages/*/{tsconfig.tsbuildinfo,lib,dist}",
"link:transai": "cd ./packages/cubejs-backend-shared && yarn link && yarn install && cd ../cubejs-backend-cloud && yarn link && yarn install && cd ../cubejs-backend-native && yarn link && yarn install && cd ../cubejs-server && yarn link && yarn install && yarn install && cd ../cubejs-server-core && yarn link && yarn install && cd ../cubejs-api-gateway && yarn link && yarn install && cd ../cubejs-schema-compiler && yarn link && yarn install && cd ../cubejs-query-orchestrator && yarn link && yarn install && cd ../cubejs-postgres-driver && yarn link && yarn install && cd ../cubejs-cubestore-driver && yarn link && yarn install && cd ../cubejs-event-emitter && yarn link && yarn install"
},
"author": "Cube Dev, Inc.",
"dependencies": {
Expand Down
2 changes: 2 additions & 0 deletions packages/cubejs-api-gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"dist/src/*"
],
"dependencies": {
"@cubejs-backend/event-emitter": "file:../cubejs-event-emitter",
"@cubejs-backend/native": "1.3.78",
"@cubejs-backend/shared": "1.3.78",
"@ungap/structured-clone": "^0.3.4",
Expand All @@ -48,6 +49,7 @@
"nexus": "^1.1.0",
"node-fetch": "^2.6.1",
"ramda": "^0.27.0",
"rxjs": "^7.8.1",
"uuid": "^8.3.2"
},
"devDependencies": {
Expand Down
24 changes: 24 additions & 0 deletions packages/cubejs-api-gateway/src/LocalSubscriptionStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@ interface LocalSubscriptionStoreOptions {
heartBeatInterval?: number;
}

const haveCommonElement = (arr1: string[], arr2: string[]): boolean => {
return arr1.some(element => arr2.includes(element));
}

// TODO: Check whether this is the correct way to get cube names
const getCubeNames = (query) => {
if (!query) {
return [];
}

const allColumns = [
...(query.measures || []).map(m => m.split('.')[0]),
...(query.dimensions || []).map(d => d.split('.')[0]),
];

return Array.from(new Set(allColumns));
};

export class LocalSubscriptionStore {
protected connections = {};

Expand All @@ -20,6 +38,7 @@ export class LocalSubscriptionStore {
const connection = this.getConnection(connectionId);
connection.subscriptions[subscriptionId] = {
...subscription,
cubes: getCubeNames(subscription.message?.params?.query),
timestamp: new Date()
};
}
Expand All @@ -45,6 +64,11 @@ export class LocalSubscriptionStore {
}).reduce((a, b) => a.concat(b), []);
}

public async getSubscriptionsByCubeName(cubes: Array<string>) {
// TODO: Implement cube filtering by auth context
return (await this.getAllSubscriptions()).filter(subscription => haveCommonElement(cubes, subscription.cubes));
}

public async cleanupSubscriptions(connectionId: string) {
delete this.connections[connectionId];
}
Expand Down
43 changes: 42 additions & 1 deletion packages/cubejs-api-gateway/src/SubscriptionServer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { v4 as uuidv4 } from 'uuid';

import { EventEmitterInterface } from '@cubejs-backend/event-emitter';
import { Subject } from 'rxjs';
import { map, filter, bufferTime, tap } from 'rxjs/operators';
import { UserError } from './UserError';
import type { ApiGateway } from './gateway';
import type { LocalSubscriptionStore } from './LocalSubscriptionStore';
Expand All @@ -20,13 +22,35 @@ const calcMessageLength = (message: unknown) => Buffer.byteLength(

export type WebSocketSendMessageFn = (connectionId: string, message: any) => Promise<void>;

const ensureArray = (value: any) => (Array.isArray(value) ? value : [value]);

export class SubscriptionServer {
readonly #cubeRenewSubject = new Subject<unknown>();

readonly #cubeRenewedPipe = this.#cubeRenewSubject.pipe(
map((val) => ensureArray(val)),
// Map only the renewedCube property
map((val) => val as Array<{ renewedCube: string | undefined }>),
map((val) => val.map(v => v.renewedCube)),
// Buffer the values for 300ms
bufferTime(100),
map((renewedCubes) => renewedCubes.flat()),
map((val) => val.filter(v => v !== undefined)),
// Filter out any empty arrays
filter((renewedCubes) => renewedCubes.length > 0),
// Convert the array of arrays to an array of unique arrays
map((renewedCubes) => Array.from(new Set(renewedCubes))),
);

public constructor(
protected readonly apiGateway: ApiGateway,
protected readonly sendMessage: WebSocketSendMessageFn,
protected readonly subscriptionStore: LocalSubscriptionStore,
protected readonly contextAcceptor: ContextAcceptorFn,
protected readonly eventEmitter: EventEmitterInterface
) {
this.eventEmitter.on('cubeRenewed', (val: unknown) => this.#cubeRenewSubject.next(val));
this.#cubeRenewedPipe.subscribe(this.renewCubes.bind(this));
}

public resultFn(connectionId: string, messageId: string, requestId: string | undefined) {
Expand Down Expand Up @@ -154,4 +178,21 @@ export class SubscriptionServer {
public clear() {
this.subscriptionStore.clear();
}

public async renewCubes(cubes) {
if (cubes.length === 0) {
return;
}

const subs = await this.subscriptionStore.getSubscriptionsByCubeName(cubes);

if (subs.length === 0) {
return;
}

console.log('Renewing subs based on changed cubes', cubes, subs.length);
subs.map(async subscription => {
this.processMessage(subscription.connectionId, subscription.message, true);
});
}
}
39 changes: 38 additions & 1 deletion packages/cubejs-api-gateway/src/gateway.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-restricted-syntax */
import * as stream from 'stream';
import { EventEmitterInterface } from '@cubejs-backend/event-emitter';
import { assertNever } from 'assert-never';
import jwt, { Algorithm as JWTAlgorithm } from 'jsonwebtoken';
import R from 'ramda';
Expand Down Expand Up @@ -180,6 +181,7 @@ class ApiGateway {
protected readonly compilerApi: (ctx: RequestContext) => Promise<any>,
protected readonly adapterApi: (ctx: RequestContext) => Promise<any>,
protected readonly logger: any,
protected readonly eventEmitter: EventEmitterInterface,
protected readonly options: ApiGatewayOptions,
) {
this.dataSourceStorage = options.dataSourceStorage;
Expand Down Expand Up @@ -465,6 +467,18 @@ class ApiGateway {
* jobs scope *
*************************************************************** */

app.get(
`${this.basePath}/v1/run-scheduled-refresh`,
userMiddlewares,
userAsyncHandler(async (req, res) => {
await this.runScheduledRefresh({
queryingOptions: req.query.queryingOptions,
context: req.context,
res: this.resToResultFn(res)
});
})
);

app.post(
`${this.basePath}/v1/pre-aggregations/jobs`,
userMiddlewares,
Expand Down Expand Up @@ -569,13 +583,35 @@ class ApiGateway {
}

public initSubscriptionServer(sendMessage: WebSocketSendMessageFn) {
return new SubscriptionServer(this, sendMessage, this.subscriptionStore, this.wsContextAcceptor);
return new SubscriptionServer(this, sendMessage, this.subscriptionStore, this.wsContextAcceptor, this.eventEmitter);
}

protected duration(requestStarted) {
return requestStarted && (new Date().getTime() - requestStarted.getTime());
}

public async runScheduledRefresh({ context, res, queryingOptions }: {
context: RequestContext,
res: ResponseResultFn,
queryingOptions: any
}) {
const requestStarted = new Date();
try {
await this.assertApiScope('jobs', context.securityContext);
const refreshScheduler = this.refreshScheduler();
res(await refreshScheduler.runScheduledRefresh(context, {
...this.parseQueryParam(queryingOptions || {}),
throwErrors: true,
forceNoCache: true,
isJob: true,
}));
} catch (e: any) {
this.handleError({
e, context, res, requestStarted
});
}
}

private filterVisibleItemsInMeta(context: RequestContext, cubes: any[]) {
const isDevMode = getEnv('devMode');
function visibilityFilter(item) {
Expand Down Expand Up @@ -2090,6 +2126,7 @@ class ApiGateway {
return;
}

// TODO: RENE
// TODO subscribe to refreshKeys instead of constantly firing load
await this.load({
query,
Expand Down
5 changes: 4 additions & 1 deletion packages/cubejs-api-gateway/test/auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import express, { Application as ExpressApplication, RequestHandler } from 'expr
// eslint-disable-next-line import/no-extraneous-dependencies
import request from 'supertest';
import jwt from 'jsonwebtoken';
import { DefaultEventEmitter } from '@cubejs-backend/event-emitter';
import { pausePromise } from '@cubejs-backend/shared';
import { resetLogger } from '@cubejs-backend/native';

Expand Down Expand Up @@ -60,7 +61,9 @@ function createApiGateway(handler: RequestHandler, logger: () => any, options: P
}
}

const apiGateway = new ApiGatewayFake('secret', <any>null, () => adapterApi, logger, {
const eventEmitter = new DefaultEventEmitter();

const apiGateway = new ApiGatewayFake('secret', <any>null, () => adapterApi, logger, eventEmitter, {
standalone: true,
dataSourceStorage,
basePath: '/cubejs-api',
Expand Down
4 changes: 3 additions & 1 deletion packages/cubejs-api-gateway/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import express from 'express';
// eslint-disable-next-line import/no-extraneous-dependencies
import request from 'supertest';
import jwt from 'jsonwebtoken';
import { DefaultEventEmitter } from '@cubejs-backend/event-emitter';

import * as console from 'console';
import { ApiGateway, ApiGatewayOptions, Query, QueryRequest, Request } from '../src';
Expand Down Expand Up @@ -52,7 +53,8 @@ async function createApiGateway(
) {
process.env.NODE_ENV = 'production';

const apiGateway = new ApiGateway(API_SECRET, compilerApi, async () => adapterApi, logger, {
const eventEmitter = new DefaultEventEmitter();
const apiGateway = new ApiGateway(API_SECRET, compilerApi, async () => adapterApi, logger, eventEmitter, {
standalone: true,
dataSourceStorage,
basePath: '/cubejs-api',
Expand Down
5 changes: 4 additions & 1 deletion packages/cubejs-api-gateway/test/permissions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
DataSourceStorageMock,
AdapterApiMock
} from './mocks';
import { DefaultEventEmitter } from '@cubejs-backend/event-emitter';

const API_SECRET = 'secret';
const AUTH_TOKEN = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.t-IDcSemACt8x4iTMCda8Yhe3iZaWbvV5XKSTbuAn0M';
Expand All @@ -18,7 +19,9 @@ function createApiGateway(
const app = express();
const adapterApi: any = new AdapterApiMock();
const dataSourceStorage: any = new DataSourceStorageMock();
const apiGateway = new ApiGateway(API_SECRET, compilerApi, () => adapterApi, logger, {
const eventEmitter = new DefaultEventEmitter();

const apiGateway = new ApiGateway(API_SECRET, compilerApi, () => adapterApi, logger, eventEmitter, {
standalone: true,
dataSourceStorage,
basePath: '/cubejs-api',
Expand Down
28 changes: 23 additions & 5 deletions packages/cubejs-backend-shared/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ const variables: Record<string, (...args: any) => any> = {
.default('false')
.asBoolStrict(),
webSockets: () => get('CUBEJS_WEB_SOCKETS')
.default('false')
.default('true')
.asBoolStrict(),
serverHeadersTimeout: () => get('CUBEJS_SERVER_HEADERS_TIMEOUT')
.asInt(),
Expand Down Expand Up @@ -2020,6 +2020,28 @@ const variables: Record<string, (...args: any) => any> = {
cubeStoreNoHeartBeatTimeout: () => get('CUBEJS_CUBESTORE_NO_HEART_BEAT_TIMEOUT')
.default('30')
.asInt(),

// EventEmitter
eventEmitterSetting: () => get('CUBEJS_EVENT_EMITTER_TYPE')
.default('memory')
.asString(),
eventEmitterRedisUrl: () => get('CUBEJS_EVENT_EMITTER_REDIS_URL')
.default('')
.asString(),

// Redis
redisPoolMin: () => get('CUBEJS_REDIS_POOL_MIN')
.default('2')
.asInt(),
redisPoolMax: () => get('CUBEJS_REDIS_POOL_MAX')
.default('1000')
.asInt(),
redisUseIORedis: () => get('CUBEJS_REDIS_USE_IOREDIS')
.default('false')
.asBoolStrict(),
redisAcquireTimeout: () => get('CUBEJS_REDIS_ACQUIRE_TIMEOUT')
.default('5000')
.asInt(),
cubeStoreRollingWindowJoin: () => get('CUBEJS_CUBESTORE_ROLLING_WINDOW_JOIN')
.default('false')
.asBoolStrict(),
Expand Down Expand Up @@ -2144,10 +2166,6 @@ const variables: Record<string, (...args: any) => any> = {
// Support for Redis as queue & cache driver was removed in 0.36
// This code is used to detect Redis and throw an error
// TODO(ovr): Remove in after 1.0 + LTS
redisUseIORedis: () => get('CUBEJS_REDIS_USE_IOREDIS')
.default('false')
.asBoolStrict(),
// TODO(ovr): Remove in after 1.0 + LTS
redisUrl: () => {
const redisUrl = get('CUBEJS_REDIS_URL')
.asString();
Expand Down
28 changes: 28 additions & 0 deletions packages/cubejs-docker/package.json.transai
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "@cubejs-backend/docker",
"version": "0.31.20",
"description": "Cube.js In Docker (virtual package)",
"author": "Cube Dev, Inc.",
"license": "Apache-2.0",
"private": true,
"engines": {
"node": "^14.0.0 || ^16.0.0 || >=17.0.0"
},
"scripts": {
"link:dev": "yarn link @cubejs-backend/shared @cubejs-backend/server @cubejs-backend/server-core @cubejs-backend/api-gateway @cubejs-backend/schema-compiler @cubejs-backend/query-orchestrator @cubejs-backend/postgres-driver @cubejs-backend/event-emitter",
"link:transai": "cd ./packages/cubejs-backend-shared && yarn link && cd ../cubejs-backend-cloud && yarn link && cd ../cubejs-backend-native && yarn link && cd ../cubejs-server && yarn link && cd ../cubejs-server-core && yarn link && cd ../cubejs-api-gateway && yarn link && cd ../cubejs-schema-compiler && yarn link && cd ../cubejs-query-orchestrator && yarn link && cd ../cubejs-postgres-driver && yarn link && cd ../cubejs-cubestore-driver && yarn link && cd ../cubejs-client-core && yarn link && cd ../cubejs-client-ws-transport && yarn link && cd ../cubejs-event-emitter && yarn link"
},
"dependencies": {
"@cubejs-backend/postgres-driver": "file:/cube-build/packages/cubejs-postgres-driver",
"@cubejs-backend/server": "file:/cube-build/packages/cubejs-server",
"cubejs-cli": "file:/cube-build/packages/cubejs-cli",
"typescript": "~4.1.5",
"@typescript-eslint/eslint-plugin": "^4.17.0",
"core-js": "^3.34.0",
"lerna": "^4.0.0",
"redis": "^4.6.14"
},
"resolutions": {
"colors": "1.4.0"
}
}
Loading