cube-js / cube-js/cube

Latest 0.34.8 cubejs-cli is failing for very simple schemas, whereas 0.33.65 worked fine

Open
#7,302 3 comments 0 reactions 1 assignee Claimed by @ovr View on GitHub
backend:cli question
Dominant language
Rust
Stars
20.8k
Forks
2.1k
Avg merge
1d 2h
Merged PRs (30d)
181

Description

**Describe the bug**
Latest 0.34.8 Cubejs-cli is failing for very simple schemas, whereas 0.33.65 worked fine.

**To Reproduce**
Here are two Docker commands that run on the same Node 18 container (i also tried on 16 and 20, same error), so we get to use a fresh cubejs-cli dependencies. This command creates the schema and validates them. You can change the node image version below to 16, 18 or 20 if you wish.

```sh
# 0.33.65 cubejs-cli. This works.
docker run --rm --entrypoint /bin/bash node:18-buster-slim -c "cd /home; echo -e 'cubes:\n - name: orders\n sql_table: public.orders\n measures:\n - name: count\n sql: id\n type: count' > cube.yaml; cat cube.yaml; npx cubejs-cli@0.33.65 validate -p ./"

# latest 0.34.8 cubejs-cli. This fails.
docker run --rm --entrypoint /bin/bash node:18-buster-slim -c "cd /home; echo -e 'cubes:\n - name: orders\n sql_table: public.orders\n measures:\n - name: count\n sql: id\n type: count' > cube.yaml; cat cube.yaml; npx cubejs-cli@0.34.8 validate -p ./"
```

**Expected behavior**
Both should return "Cube Schema is valid", but the latest cubejs-cli fails with cryptic

```
Cube Error ---------------------------------------

undefined

Need some help? -------------------------------------
TypeError: Cannot read properties of undefined (reading 'toString')
```

**Screenshots**

**Minimally reproducible Cube Schema**
```yaml
cubes:
- name: orders
sql_table: public.orders
measures:
- name: count
sql: id
type: count
```
**Version:**
0.34.8

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.