Skip to content

Commit 64f6cba

Browse files
authored
Merge branch 'main' into ignore-view-cluster-by
2 parents c9214f9 + 4e2dd29 commit 64f6cba

Some content is hidden

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

67 files changed

+3082
-525
lines changed

.circleci/manage-test-db.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ redshift_down() {
8080
EXIT_CODE=1
8181
ATTEMPTS=0
8282
while [ $EXIT_CODE -ne 0 ] && [ $ATTEMPTS -lt 5 ]; do
83-
redshift_exec "select pg_terminate_backend(procpid) from pg_stat_activity where datname = '$1'"
83+
# note: sometimes this pg_terminate_backend() call can randomly fail with: ERROR: Insufficient privileges
84+
# if it does, let's proceed with the drop anyway rather than aborting and never attempting the drop
85+
redshift_exec "select pg_terminate_backend(procpid) from pg_stat_activity where datname = '$1'" || true
86+
87+
# perform drop
8488
redshift_exec "drop database $1;" && EXIT_CODE=$? || EXIT_CODE=$?
8589
if [ $EXIT_CODE -ne 0 ]; then
8690
echo "Unable to drop database; retrying..."

.github/workflows/pr.yaml

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
run: pnpm exec playwright install
5959
- name: Run e2e tests
6060
working-directory: ./vscode/extension
61-
timeout-minutes: 90
61+
timeout-minutes: 30
6262
run: |
6363
source ../../.venv/bin/activate
6464
pnpm run test:e2e
@@ -92,6 +92,44 @@ jobs:
9292
# of DuckDB require a version of DuckDB we no longer support
9393
run: |
9494
source .venv/bin/activate
95+
96+
# Remove semantic_models and metrics sections for DBT versions < 1.6.0
97+
# Using explicit list to avoid version comparison issues
98+
if [[ "${{ matrix.dbt-version }}" == "1.3" ]] || \
99+
[[ "${{ matrix.dbt-version }}" == "1.4" ]] || \
100+
[[ "${{ matrix.dbt-version }}" == "1.5" ]]; then
101+
102+
echo "DBT version is ${{ matrix.dbt-version }} (< 1.6.0), removing semantic_models and metrics sections..."
103+
104+
schema_file="tests/fixtures/dbt/sushi_test/models/schema.yml"
105+
if [[ -f "$schema_file" ]]; then
106+
echo "Modifying $schema_file..."
107+
108+
# Create a temporary file
109+
temp_file=$(mktemp)
110+
111+
# Use awk to remove semantic_models and metrics sections
112+
awk '
113+
/^semantic_models:/ { in_semantic=1; next }
114+
/^metrics:/ { in_metrics=1; next }
115+
/^[^ ]/ && (in_semantic || in_metrics) {
116+
in_semantic=0;
117+
in_metrics=0
118+
}
119+
!in_semantic && !in_metrics { print }
120+
' "$schema_file" > "$temp_file"
121+
122+
# Move the temp file back
123+
mv "$temp_file" "$schema_file"
124+
125+
echo "Successfully removed semantic_models and metrics sections"
126+
else
127+
echo "Schema file not found at $schema_file, skipping..."
128+
fi
129+
else
130+
echo "DBT version is ${{ matrix.dbt-version }} (>= 1.6.0), keeping semantic_models and metrics sections"
131+
fi
132+
95133
make dbt-fast-test
96134
- name: Test SQLMesh info in sushi_dbt
97135
working-directory: ./examples/sushi_dbt
@@ -104,4 +142,5 @@ jobs:
104142
else
105143
echo "DBT version is ${{ matrix.dbt-version }} (>= 1.5.0), keeping version parameters"
106144
fi
145+
107146
sqlmesh info --skip-connection

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@ install-dev-dbt-%:
4343
fi; \
4444
$(MAKE) install-dev; \
4545
if [ "$$version" = "1.6.0" ]; then \
46-
echo "Applying pydantic override for dbt 1.6.0"; \
47-
$(PIP) install 'pydantic>=2.0.0' --reinstall; \
46+
echo "Applying overrides for dbt 1.6.0"; \
47+
$(PIP) install 'pydantic>=2.0.0' 'google-cloud-bigquery==3.30.0' 'databricks-sdk==0.28.0' --reinstall; \
48+
fi; \
49+
if [ "$$version" = "1.7.0" ]; then \
50+
echo "Applying overrides for dbt 1.7.0"; \
51+
$(PIP) install 'databricks-sdk==0.28.0' --reinstall; \
4852
fi; \
4953
mv pyproject.toml.backup pyproject.toml; \
5054
echo "Restored original pyproject.toml"

0 commit comments

Comments
 (0)