This page provides an overview of features that are deprecated in Cube.js. Changes in packaging, and supported (Linux) distributions are not included. To learn about end of support for Linux distributions, refer to the changelog.
As changes are made to Cube.js, there may be times when existing features need to be removed or replaced with newer features. Before an existing feature is removed it is marked as "deprecated" within the documentation and remains in Cube.js for at least one stable release unless specified explicitly otherwise. After that time it may be removed.
Users are expected to take note of the list of deprecated features each release and plan their migration away from those features, and (if applicable) towards the replacement features as soon as possible.
The table below provides an overview of the current status of deprecated features:
- Deprecated: the feature is marked "deprecated" and should no longer be used. The feature may be removed, disabled, or change behavior in a future release. The "Deprecated" column contains the release in which the feature was marked deprecated, whereas the "Remove" column contains a tentative release in which the feature is to be removed.
- Removed: the feature was removed, disabled, or hidden. Refer to the linked section for details. Some features are "soft" deprecated, which means that they remain functional for backward compatibility, and to allow users to migrate to alternatives. In such cases, a warning may be printed, and users should not rely on this feature.
Status | Feature | Deprecated | Remove |
---|---|---|---|
Removed | Node.js 8 | v0.22.4 | v0.26.0 |
Deprecated | hearBeatInterval |
v0.23.8 | June 2021 |
Removed | CUBEJS_ENABLE_TLS |
v0.23.11 | v0.26.0 |
Deprecated | Embedding Cube.js within Express | v0.24.0 | June 2021 |
Deprecated | Absolute import for @cubejs-backend/query-orchestrator |
v0.24.2 | v0.28.0 |
Removed | contextToDataSourceId |
v0.25.0 | v0.25.0 |
Deprecated | Absolute import for @cubejs-backend/server-core |
v0.25.4 | v0.30.0 |
Deprecated | Absolute import for @cubejs-backend/schema-compiler |
v0.25.21 | v0.32.0 |
Deprecated | checkAuthMiddleware |
v0.26.0 | |
Removed | Node.js 10 | v0.26.0 | v0.29.0 |
Removed | Node.js 15 | v0.26.0 | v0.29.0 |
Deprecated | USER_CONTEXT |
v0.26.0 | |
Deprecated | authInfo |
v0.26.0 | |
Deprecated | Prefix Redis environment variables with CUBEJS_ |
v0.27.0 | |
Deprecated | Node.js 12 | v0.29.0 |
Removed in Release: v0.26.0
Node.js 8 reached End of Life on December 31, 2019. This means no more updates. Please upgrade to Node.js 10 or higher.
Deprecated in Release: v0.23.8
This option for @cubejs-client/ws-transport
has been
replaced by heartBeatInterval
.
Removed in Release: v0.26.0
We no longer recommend setting TLS options via Cube.js. Developers should set up TLS on a load balancer or reverse proxy instead. Read more here.
Deprecated in Release: v0.24.0
Embedding Cube.js into Express applications is deprecated due to performance and reliability considerations. Read more about this change here.
Developers are encouraged to migrate to the new cube.js
configuration
file and deploy Cube.js as a microservice (or multiple
microservices, if necessary).
Deprecated in Release: v0.24.2
Absolute imports are highly dependent on a path, and all API becomes public. We now provide a public API from the package directly.
Deprecated:
const BaseDriver = require('@cubejs-backend/query-orchestrator/driver/BaseDriver');
You should use:
const { BaseDriver } = require('@cubejs-backend/query-orchestrator');
Removed in Release: v0.25.0
The contextToDataSourceId
option in the cube.js
configuration file has been
replaced by contextToOrchestratorId
. Prior to
this change, multi-tenant setups were forced to share a Query Orchestrator
instance. Now orchestrator instances can be shared by Cube.js instances and
across different tenants, if need be. Single-tenant setups should consider
removing the contextToDataSourceId
property completely.
Deprecated in Release: v0.25.4
Absolute imports are highly dependent on a path, and all API becomes public. We now provide a public API from the package directly.
Deprecated:
const CubejsServerCore = require('@cubejs-backend/server-core');
You should use:
const { CubejsServerCore } = require('@cubejs-backend/server-core');
Deprecated in Release: v0.25.21
Absolute imports are highly dependent on a path, and all API becomes public. We now provide a public API from the package directly.
Deprecated:
const BaseQuery = require('@cubejs-backend/schema-compiler/adapter/BaseQuery');
You should use:
const { BaseQuery } = require('@cubejs-backend/schema-compiler');
Deprecated in Release: v0.26.0
The checkAuthMiddleware
option was tightly bound to Express,
which has been deprecated. Since Cube.js
supports HTTP and WebSockets as transports, we want our authentication API
to not rely on transport-specific details. We now recommend using
checkAuth
as a transport-agnostic method of authentication.
This means the same authentication logic can be reused for both HTTP and
Websockets transports.
If you are using custom authorization, please take a look at the documentation
Removed in Release: v0.29.0
Node.js 10 reached End of Life on April 30, 2021. This means no more updates. Please upgrade to Node.js 12 or higher.
Deprecated in Release: v0.26.0
USER_CONTEXT
has been renamed to SECURITY_CONTEXT
.
Deprecated:
cube(`visitors`, {
sql: `select * from visitors WHERE ${USER_CONTEXT.source.filter('source')}`,
});
You should use:
cube(`visitors`, {
sql: `select * from visitors WHERE ${SECURITY_CONTEXT.source.filter(
'source'
)}`,
});
Deprecated in Release: v0.26.0
The authInfo
parameter to checkAuth
no longer wraps the decoded JWT under
the u
property. It has also been renamed to
securityContext
. Additionally, the security context
claims are now populated from the root payload instead of the u
property.
Old shape of authInfo
:
{
"sub": "1234567890",
"u": {
"user_id": 131
}
}
New shape of authInfo
:
{
"sub": "1234567890",
"user_id": 131
}
Deprecated:
const server = new CubejsServer({
checkAuth: async (req, auth) => {
// Notice how we're using the `u` property in `jwt.verify()` and assigning the result to `req.authInfo`
req.authInfo = jwt.verify({ u: auth }, pem);
},
contextToAppId: ({ authInfo }) => `APP_${authInfo.userId}`,
preAggregationsSchema: ({ authInfo }) =>
`pre_aggregations_${authInfo.userId}`,
});
You should use:
const server = new CubejsServer({
checkAuth: async (req, auth) => {
// We're now using directly assigning the result of `jet.verify()` to the `securityContext` property
req.securityContext = jwt.verify(auth, pem);
},
// And here we're now using the `securityContext` parameter
contextToAppId: ({ securityContext }) => `APP_${securityContext.userId}`,
// And the same here
preAggregationsSchema: ({ securityContext }) =>
`pre_aggregations_${securityContext.userId}`,
});
Redis-related environment variables are now prefixed with CUBEJS_
for
consistency with other environment variables.
Deprecated in Release: v0.27.0
Deprecated:
REDIS_URL=XXXX
REDIS_PASSWORD=XXX
REDIS_TLS=true
You should use:
CUBEJS_REDIS_URL=XXXX
CUBEJS_REDIS_PASSWORD=XXX
CUBEJS_REDIS_TLS=true
Removed in Release: v0.29.0
Node.js 15 reached End of Life on June 1, 2021. This means no more updates. Please upgrade to Node.js 14 or higher.
Deprecated in Release: v0.29.0
Node.js 12 reached End of Life on May 19, 2021. This means no more updates. Please upgrade to Node.js 14 or higher.
Deprecated in Release: v0.29.0
Cube no longer supports using databases such as MySQL and Postgres as external databases. Please switch to using Cube Store as it is a more robust and reliable solution.