Skip to content

Commit

Permalink
Fix pip upgrades in dbt examples
Browse files Browse the repository at this point in the history
Summary:
Switch to the correct command for upgrading pip.
  • Loading branch information
gibsondan committed Aug 28, 2024
1 parent 218bdf8 commit d0dcaa3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ The last step is to update the [CI/CD files](/dagster-plus/references/ci-cd-file
- name: Prepare DBT project for deployment
if: steps.prerun.outputs.result == 'pex-deploy'
run: |
pip install pip --upgrade
python -m pip install pip --upgrade
cd project-repo
pip install . --upgrade --upgrade-strategy eager ## Install the Python dependencies from the setup.py file, ex: dbt-core and dbt-duckdb
dagster-dbt project prepare-and-package --file <DAGSTER_PROJECT_FOLDER>/project.py ## Replace with the project.py location in the Dagster project folder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ To get our deployment working, we need to add a step to our GitHub Actions workf
2. Open the `deploy.yml` file.
3. Locate the `Checkout for Python Executable Deploy` step, which should be on or near line 38.
4. After this step, add the following:

```yaml
- name: Prepare DBT project for deployment
if: steps.prerun.outputs.result == 'pex-deploy'
run: |
pip install pip --upgrade
python -m pip install pip --upgrade
cd project-repo
pip install . --upgrade --upgrade-strategy eager
dagster-dbt project prepare-and-package --file dagster_university/project.py
Expand All @@ -33,7 +33,7 @@ To get our deployment working, we need to add a step to our GitHub Actions workf
The code above:
1. Creates a step named `Prepare DBT project for deployement`
2. Upgrades `pip`, the package installer for Python
2. Upgrades `pip`, the package installer for Python
3. Navigates inside the `project-repo` folder
4. Upgrades the project dependencies
5. Prepares the manifest file by running the `dagster-dbt project prepare-and-package` command, specifying the file in which the `DbtProject` object is located.
Expand All @@ -58,9 +58,9 @@ At this point, your dbt project will be successfully deployed onto Dagster+ and

## Experiencing issues?

There are two ways to deploy Dagster+ Serverless. In our case, we only made changes to deploy dbt with the default option, called Fast Deploys with PEX (Python Executable).
There are two ways to deploy Dagster+ Serverless. In our case, we only made changes to deploy dbt with the default option, called Fast Deploys with PEX (Python Executable).

**If you receive an error message to turn off Fast Deploys**, GitHub Actions will skip the steps that build the dbt project. We recommend staying with Fast Deploys, if possible.
**If you receive an error message to turn off Fast Deploys**, GitHub Actions will skip the steps that build the dbt project. We recommend staying with Fast Deploys, if possible.

**If your project works locally**, the issue is likely a mismatch between where Dagster looks for the manifest locally and in production. This can be resolved by tinkering with where the manifest is being written.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Prepare DBT project for deployment
if: steps.prerun.outputs.result == 'pex-deploy'
run: |
pip install pip --upgrade
python -m pip install pip --upgrade
cd project-repo
pip install . --upgrade --upgrade-strategy eager
dagster-dbt project prepare-and-package --file assets_dbt_python/project.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Prepare DBT project for deployment
if: steps.prerun.outputs.result == 'pex-deploy'
run: |
pip install pip --upgrade
python -m pip install pip --upgrade
cd project-repo
pip install . --upgrade --upgrade-strategy eager
dagster-dbt project prepare-and-package --file assets_dbt_python/project.py
Expand Down

0 comments on commit d0dcaa3

Please sign in to comment.