Skip to content

Commit 7fa80a6

Browse files
authored
Merge branch 'master' into vertica_driver
2 parents 79b3ca0 + 7ccd607 commit 7fa80a6

File tree

232 files changed

+7527
-3070
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

232 files changed

+7527
-3070
lines changed

.github/actions/smoke.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,7 @@ echo "::endgroup::"
6060
echo "::group::Vertica"
6161
yarn lerna run --concurrency 1 --stream --no-prefix smoke:vertica
6262
echo "::endgroup::"
63+
64+
echo "::group::RBAC"
65+
yarn lerna run --concurrency 1 --stream --no-prefix smoke:rbac
66+
echo "::endgroup::"

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [1.1.7](https://github.com/cube-js/cube/compare/v1.1.6...v1.1.7) (2024-11-20)
7+
8+
9+
### Bug Fixes
10+
11+
* **cubesql:** Support explicit UTC as timezone in pushdown SQL generation ([#8971](https://github.com/cube-js/cube/issues/8971)) ([85eaa29](https://github.com/cube-js/cube/commit/85eaa29a3e8df520fbdc8b2df0ece4a131c39cdc)), closes [/github.com/cube-js/arrow-datafusion/blob/dcf3e4aa26fd112043ef26fa4a78db5dbd443c86/datafusion/physical-expr/src/datetime_expressions.rs#L357-L367](https://github.com//github.com/cube-js/arrow-datafusion/blob/dcf3e4aa26fd112043ef26fa4a78db5dbd443c86/datafusion/physical-expr/src/datetime_expressions.rs/issues/L357-L367)
12+
* **databricks-driver:** fix databricks bucket URL parsing. Now driver supports both (legacy and modern urls) ([#8968](https://github.com/cube-js/cube/issues/8968)) ([137de67](https://github.com/cube-js/cube/commit/137de6725b8150cb418b03aa59443525039380c0))
13+
* **jdbc-driver:** Log errors from connection pool factory ([#8903](https://github.com/cube-js/cube/issues/8903)) ([cfdc2a2](https://github.com/cube-js/cube/commit/cfdc2a28cd9706dc91557f499e3412bab9ff9a07))
14+
15+
16+
### Features
17+
18+
* **clickhouse-driver:** Switch from apla-clickhouse to @clickhouse/client ([#8928](https://github.com/cube-js/cube/issues/8928)) ([e25e65f](https://github.com/cube-js/cube/commit/e25e65fd578bef099c351393ae32da751be351dc))
19+
20+
21+
22+
23+
624
## [1.1.6](https://github.com/cube-js/cube/compare/v1.1.5...v1.1.6) (2024-11-17)
725

826

dev-env.sh

Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
CURRENT_DIR=$(pwd)
6+
SCRIPT_DIR=$(dirname "$(realpath "$0")")
7+
8+
# Function to install dependencies in root
9+
install_root_dependencies() {
10+
echo "Running 'yarn install' in the root directory..."
11+
cd "$SCRIPT_DIR"
12+
yarn install
13+
}
14+
15+
# Function to build all packages
16+
build_packages() {
17+
echo "Building all packages..."
18+
cd "$SCRIPT_DIR"
19+
for package in packages/*; do
20+
if [ -d "$package" ]; then
21+
echo "Building $package..."
22+
cd "$package"
23+
if ! yarn build 2>/dev/null; then
24+
#echo "yarn build failed for $package, trying yarn tsc..."
25+
yarn tsc 2>/dev/null || true
26+
fi
27+
cd "$SCRIPT_DIR"
28+
fi
29+
done
30+
}
31+
32+
# Function to create yarn links for all packages
33+
link_packages() {
34+
echo "Linking all packages..."
35+
cd "$SCRIPT_DIR"
36+
for package in packages/*; do
37+
if [ -d "$package" ]; then
38+
echo "Linking $package..."
39+
cd "$package"
40+
yarn link
41+
cd "$SCRIPT_DIR"
42+
fi
43+
done
44+
}
45+
46+
# Function to get available database types
47+
get_db_types() {
48+
cd "$SCRIPT_DIR"
49+
db_types=()
50+
for package in packages/cubejs-*-driver; do
51+
if [ -d "$package" ]; then
52+
db_name=$(basename "$package" | sed 's/cubejs-\(.*\)-driver/\1/')
53+
if [ "$db_name" != "base" ]; then
54+
db_types+=("$db_name")
55+
fi
56+
fi
57+
done
58+
printf "%s\n" "${db_types[@]}"
59+
}
60+
61+
# Function to create new project
62+
create_project() {
63+
local app_name=$1
64+
local db_type=$2
65+
66+
# If app_name is not provided, ask for it
67+
if [ -z "$app_name" ]; then
68+
read -r -p "Enter the application name: " app_name
69+
fi
70+
71+
# If db_type is not provided, show selection menu
72+
if [ -z "$db_type" ]; then
73+
# Get available database types
74+
db_types=()
75+
while IFS= read -r line; do
76+
db_types+=("$line")
77+
done < <(get_db_types)
78+
79+
echo "Available database types:"
80+
PS3='Please select the database type: '
81+
select DB_TYPE in "${db_types[@]}"
82+
do
83+
if [[ -n "$DB_TYPE" ]]; then
84+
db_type=$DB_TYPE
85+
break
86+
else
87+
echo "Invalid selection. Please try again."
88+
fi
89+
done
90+
fi
91+
92+
cd "$CURRENT_DIR"
93+
echo "Creating new project with name $app_name and database type $db_type..."
94+
node "$SCRIPT_DIR/packages/cubejs-cli/dist/src/index.js" create "$app_name" -d "$db_type"
95+
link_project_packages "$app_name"
96+
97+
echo "Project setup completed!"
98+
echo "You can now run 'yarn dev' in the $app_name directory to start your project."
99+
}
100+
101+
# Function to link packages to new project
102+
link_project_packages() {
103+
local app_name=$1
104+
105+
echo "Linking packages in the new project..."
106+
cd "$CURRENT_DIR/$app_name"
107+
for package in "$SCRIPT_DIR"/packages/*; do
108+
if [ -d "$package" ]; then
109+
package_name=$(node -p "require('$package/package.json').name")
110+
echo "Linking $package_name..."
111+
yarn link "$package_name"
112+
fi
113+
done
114+
}
115+
116+
# Main execution function
117+
setup() {
118+
local app_name=$1
119+
local db_type=$2
120+
121+
install_root_dependencies
122+
build_packages
123+
link_packages
124+
create_project "$app_name" "$db_type"
125+
}
126+
127+
# Function to show help
128+
show_help() {
129+
echo "Development environment setup script for Cube"
130+
echo ""
131+
echo "Usage: ./dev-env.sh <command> [arguments]"
132+
echo ""
133+
echo "Commands:"
134+
echo " install Install dependencies in root directory"
135+
echo " Usage: ./dev-env.sh install"
136+
echo ""
137+
echo " build Build all packages"
138+
echo " Usage: ./dev-env.sh build"
139+
echo ""
140+
echo " drivers List available database drivers"
141+
echo " Usage: ./dev-env.sh drivers"
142+
echo ""
143+
echo " create Create a new project"
144+
echo " Usage: ./dev-env.sh create [app_name] [db_type]"
145+
echo " If arguments are omitted, will ask interactively"
146+
echo ""
147+
echo " link Link all packages and link them to a project"
148+
echo " Usage: ./dev-env.sh link [app_name]"
149+
echo ""
150+
echo " setup Run all steps (install, build, link, create project)"
151+
echo " Usage: ./dev-env.sh setup [app_name] [db_type]"
152+
echo " If arguments are omitted, will ask interactively"
153+
echo ""
154+
echo "Options:"
155+
echo " -h, --help Show this help message"
156+
echo ""
157+
echo "Examples:"
158+
echo " ./dev-env.sh create my-app postgres"
159+
echo " ./dev-env.sh setup my-app"
160+
echo " ./dev-env.sh link my-app"
161+
}
162+
163+
command=$1
164+
165+
# Show help if no command provided
166+
if [ -z "$command" ]; then
167+
show_help
168+
exit 0
169+
fi
170+
171+
case "$command" in
172+
"install")
173+
install_root_dependencies
174+
;;
175+
"build")
176+
build_packages
177+
;;
178+
"link")
179+
link_packages
180+
link_project_packages "$2"
181+
;;
182+
"drivers")
183+
get_db_types
184+
;;
185+
"create")
186+
create_project "$2" "$3"
187+
;;
188+
"setup")
189+
setup "$2" "$3"
190+
;;
191+
"-h"|"--help"|"help")
192+
show_help
193+
;;
194+
*)
195+
echo "Error: Unknown command '$command'"
196+
echo ""
197+
show_help
198+
exit 1
199+
;;
200+
esac
201+
202+
cd "$CURRENT_DIR"
203+

dev_env_setup.sh

Lines changed: 0 additions & 156 deletions
This file was deleted.

0 commit comments

Comments
 (0)