From 790451661be9e90bc660e66381a0357830353460 Mon Sep 17 00:00:00 2001 From: Jillian Vogel Date: Wed, 27 Mar 2024 16:33:54 +1030 Subject: [PATCH] fix: install aspects-dbt package requirements before running dbt and bump aspects-dbt branch to v3.9.1 to fix dbt-core dependency issue. --- tutoraspects/plugin.py | 2 +- .../templates/aspects/apps/aspects/scripts/dbt.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tutoraspects/plugin.py b/tutoraspects/plugin.py index c71b62c69..b43d9de70 100644 --- a/tutoraspects/plugin.py +++ b/tutoraspects/plugin.py @@ -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 diff --git a/tutoraspects/templates/aspects/apps/aspects/scripts/dbt.sh b/tutoraspects/templates/aspects/apps/aspects/scripts/dbt.sh index 4109d9c79..f2b6e66cb 100644 --- a/tutoraspects/templates/aspects/apps/aspects/scripts/dbt.sh +++ b/tutoraspects/templates/aspects/apps/aspects/scripts/dbt.sh @@ -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 @@ -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 }}