Skip to content

Commit 95e9581

Browse files
committed
Revert "feat(native): Initial support for cube.py (Python configuration) (#6465)"
This reverts commit c41af63.
1 parent 8882a0f commit 95e9581

File tree

26 files changed

+64
-1218
lines changed

26 files changed

+64
-1218
lines changed

packages/cubejs-backend-native/Cargo.lock

Lines changed: 20 additions & 128 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cubejs-backend-native/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ log = "=0.4.11"
2424
simple_logger = "1.7.0"
2525
uuid = { version = "0.8", features = ["v4"] }
2626
once_cell = "1.10"
27-
pyo3 = { version = "0.18.3", features = [] }
28-
pyo3-asyncio = { version = "0.18.0", features = ["tokio-runtime"] }
29-
convert_case = "0.4"
3027

3128
[dependencies.neon]
3229
version = "=0.10.0"

packages/cubejs-backend-native/js/index.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -238,30 +238,3 @@ export const shutdownInterface = async (instance: SqlInterfaceInstance): Promise
238238

239239
await new Promise((resolve) => setTimeout(resolve, 2000));
240240
}
241-
242-
interface PyConfiguration {
243-
checkAuth?: (req: unknown, authorization: string) => Promise<void>
244-
queryRewrite?: (query: unknown, ctx: unknown) => Promise<unknown>
245-
}
246-
247-
export const pythonLoadConfig = async (context: string, options: { file: string }): Promise<PyConfiguration> => {
248-
const native = loadNative();
249-
const config = await native.pythonLoadConfig(context, options);
250-
251-
if (config.checkAuth) {
252-
const nativeCheckAuth = config.checkAuth;
253-
config.checkAuth = async (req: any, authorization: string) => {
254-
return nativeCheckAuth(
255-
// Req is a large object, let's simplify it
256-
{
257-
url: req.url,
258-
method: req.method,
259-
headers: req.headers,
260-
},
261-
authorization
262-
);
263-
};
264-
}
265-
266-
return config;
267-
}

packages/cubejs-backend-native/package.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@
1818
"install": "node-pre-gyp install || echo 'Your system is not supported by @cubejs-backend/native, some feature will be unavailable.'",
1919
"upload-binary-cross": "mkdir -p native && cp index.node native/index.node && node-pre-gyp package --target_arch=$PACKAGE_TARGET_ARCH --target_platform=$PACKAGE_TARGET_PLATFORM --target_libc=$PACKAGE_TARGET_LIBC && node-pre-gyp-github publish",
2020
"upload-binary": "mkdir -p native && cp index.node native/index.node && node-pre-gyp package && node-pre-gyp-github publish",
21-
"test:server": "CUBEJS_NATIVE_INTERNAL_DEBUG=true CUBESQL_LOG_LEVEL=trace CUBESQL_PG_PORT=5555 node dist/test/server.js",
22-
"test:server:stream": "CUBESQL_STREAM_MODE=true CUBESQL_LOG_LEVEL=error CUBESQL_PG_PORT=5555 node dist/test/server.js",
23-
"test:python": "CUBEJS_NATIVE_INTERNAL_DEBUG=true CUBESQL_LOG_LEVEL=trace CUBESQL_PG_PORT=5555 node dist/test/python.js",
24-
"test:unit": "jest --forceExit",
21+
"test:server": "CUBEJS_NATIVE_INTERNAL_DEBUG=true CUBESQL_LOG_LEVEL=trace CUBESQL_PG_PORT=5555 node test/server.js",
22+
"test:server:stream": "CUBESQL_STREAM_MODE=true CUBESQL_LOG_LEVEL=error CUBESQL_PG_PORT=5555 node test/server.js",
23+
"test:unit": "jest --forceExit test",
2524
"test:cargo": "cargo test"
2625
},
2726
"engines": {
@@ -57,10 +56,8 @@
5756
"testEnvironment": "node",
5857
"verbose": true,
5958
"roots": [
60-
"<rootDir>/dist/test/"
61-
],
62-
"setupFilesAfterEnv": [
63-
"<rootDir>/dist/test/setup/index.js"
59+
"<rootDir>/js/",
60+
"<rootDir>/test/"
6461
]
6562
},
6663
"license": "Apache-2.0",

packages/cubejs-backend-native/python/cube/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)