Skip to content

Commit

Permalink
fix: install aspects-dbt package requirements before running dbt
Browse files Browse the repository at this point in the history
and bump aspects-dbt branch to v3.9.1 to fix dbt-core dependency issue.
  • Loading branch information
pomegranited committed Mar 27, 2024
1 parent a2b0719 commit 7904516
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tutoraspects/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
# For now we are pulling this from github, which should allow maximum
# flexibility for forking, running branches, specific versions, etc.
("DBT_REPOSITORY", "https://github.com/openedx/aspects-dbt"),
("DBT_BRANCH", "v3.9.0"),
("DBT_BRANCH", "v3.9.1"),
("DBT_SSH_KEY", ""),
("DBT_STATE_DIR", "/app/aspects/dbt_state/"),
# This is a pip compliant list of Python packages to install to run dbt
Expand Down
8 changes: 4 additions & 4 deletions tutoraspects/templates/aspects/apps/aspects/scripts/dbt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
## WARNING: If you modify this block, make sure to also update the
## corresponding block in the init-aspects.sh file.

echo "Installing dbt packages..."

pip install -r /app/aspects/dbt/requirements.txt

{% if DBT_SSH_KEY %}
mkdir -p /root/.ssh
echo "{{ DBT_SSH_KEY}}" | tr -d '\r' > /root/.ssh/id_rsa
Expand All @@ -24,6 +20,10 @@ git clone -b {{ DBT_BRANCH }} {{ DBT_REPOSITORY }} aspects-dbt

cd aspects-dbt || exit

echo "Installing dbt python requirements"
pip install -r ./requirements.txt
pip install -r /app/aspects/dbt/requirements.txt

export ASPECTS_EVENT_SINK_DATABASE={{ASPECTS_EVENT_SINK_DATABASE}}
export ASPECTS_XAPI_DATABASE={{ASPECTS_XAPI_DATABASE}}
export DBT_STATE={{ DBT_STATE_DIR }}
Expand Down

0 comments on commit 7904516

Please sign in to comment.