Skip to content

Commit 31284af

Browse files
Fix schema name generation for branch names with forward slashes
- Update sed regex from 's/-/_/g' to 's/[-\/]/_/g' to handle both hyphens and forward slashes - Fixes CI failures when branch names contain '/' characters like 'devin/ELE-4833-1753733759' - Ensures valid database schema names are generated for all branch naming patterns Co-Authored-By: Yosef Arbiv <yosef.arbiv@gmail.com>
1 parent dc8fba5 commit 31284af

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/test-warehouse.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
run: |
124124
mkdir -p ~/.dbt
125125
DBT_VERSION=$(pip show dbt-core | grep -i version | awk '{print $2}' | sed 's/\.//g')
126-
UNDERSCORED_REF_NAME=$(echo "${{ inputs.warehouse-type }}_dbt_${DBT_VERSION}_${BRANCH_NAME}" | awk '{print tolower($0)}' | head -c 40 | sed "s/-/_/g")
126+
UNDERSCORED_REF_NAME=$(echo "${{ inputs.warehouse-type }}_dbt_${DBT_VERSION}_${BRANCH_NAME}" | awk '{print tolower($0)}' | head -c 40 | sed "s/[-\/]/_/g")
127127
echo "$PROFILES_YML" | base64 -d | sed "s/<SCHEMA_NAME>/dbt_pkg_$UNDERSCORED_REF_NAME/g" > ~/.dbt/profiles.yml
128128
129129
- name: Check DWH connection

0 commit comments

Comments
 (0)