Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbt version upgrade #53

Open
jcvegan opened this issue Jun 20, 2023 · 13 comments
Open

dbt version upgrade #53

jcvegan opened this issue Jun 20, 2023 · 13 comments

Comments

@jcvegan
Copy link

jcvegan commented Jun 20, 2023

Hi, is there a plan to upgrade the dbt cli to version 1.5.0?

@acjay
Copy link

acjay commented Jun 21, 2023

Alternatively, might it be possible to take the desired version number as a parameter?

@jcvegan
Copy link
Author

jcvegan commented Jun 22, 2023

Yes! That would be even better

@mwhitaker
Copy link
Owner

Hi folks,

Upgrading to a new version of dbt is a manual process for me. Unfortunately, dbt doesn't release a Docker image that could be used directly, so I am building it myself and host it on Dockerhub. Once the dbt image is built I can use it in the Github Action Dockerfile. Not sure if there is a sensible way to automate this.

Anyway, I'll get the latest version updated the v1.5 shortly.

Thanks for the comments and suggestions!

@mwhitaker
Copy link
Owner

Would you mind testing the v1.5 before I merge that to main?

jobs:
  action:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      - name: dbt-run
        uses: mwhitaker/[email protected]
        with:
          dbt_command: "dbt run --profiles-dir ."
          dbt_project_folder: "dbt_project"

@leo-schick
Copy link
Contributor

@mwhitaker when do you plan to upgrade to dbt core 1.7.3 / 1.6.9?

@mwhitaker
Copy link
Owner

#60

working on this now

@mroy-seedbox
Copy link

Version 1.7.15 would be awesome, as it moves the profile configs to project flags instead.

Right now the action crashes when project flags are present. 😞

16:16:24  Running with dbt=1.7.3
16:16:25  Encountered an error:
Runtime Error
  at path []: Additional properties are not allowed ('flags' was unexpected)

@dylanvanw
Copy link

dylanvanw commented Jun 18, 2024

Not sure if this would satisfy your requirements but a way to automate the dbt version upgrade can be by using the docker image provided by dbt-labs: docker pull ghcr.io/dbt-labs/<db_adapter_name>:<version_tag>

This is how I use it in my own Dockerfiles as example:

FROM --platform=linux/amd64 ghcr.io/dbt-labs/dbt-bigquery:1.8.1

@mwhitaker
Copy link
Owner

mwhitaker commented Jun 19, 2024 via email

@bzillins
Copy link

bzillins commented Jul 9, 2024

@mwhitaker I recently hacked a 1.8.3 action together in order to utilize the recently released dbt unit test functionality and it went very smoothly after your changes from PR 60

A quick search didn't show any docker images with "all" of the connectors present like yours so I took the same path of building an image.

Thank you for putting this together and sorry for hacking up your Dockerfile so badly!

@mroy-seedbox
Copy link

mroy-seedbox commented Jul 26, 2024

Workaround: we replaced this action with a local action instead (see documentation here).

First, we had to create the custom action in .github/actions/dbt-action/action.yml. We copied the action in this repo, and replaced the runs config with this (see documentation here):

runs:
  using: "docker"
  image: "ghcr.io/dbt-labs/dbt-snowflake:1.7.5"
  entrypoint: ./.github/actions/dbt-action/entrypoint.sh
  args:
    - ${{ inputs.dbt_command }}

And we also copied entrypoint.sh into .github/actions/dbt-action/entrypoint.sh (as seen above).

Then we just had to replace uses: mwhitaker/dbt-action@master with uses: ./.github/actions/dbt-action.

Bonus: it also performs a lot faster since it doesn't need to build the container from scratch (from the Dockerfile).

@mroy-seedbox
Copy link

mroy-seedbox commented Jul 26, 2024

@mwhitaker: I think it might be possible for your action to take the Docker image as a parameter, which would greatly simplify things for everyone.

Something like image: "${{ inputs.docker_image }}".

  • Everyone could pick whichever DBT version they want (based on the Docker image they specify).
  • The Docker images provided by DBT (with one single provider/connector) are enough for most people.
  • Maybe provide a sensible default? Which could be your very own Docker image.
  • This would allow you to decouple the Dockerfile/Docker image and the DBT version from this action entirely. 🚀

@albertotb
Copy link

Same here. It would be very helpful to be able to upgrade to dbt>1.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants