Comments (9)
I've got the same issue here - pre-commit is receiving a single parameter "run --files <space-separated file list>
" rather than separate parameters.
We used the steps straight off the readme, and while the workaround above worked for us this is suboptimal for new users.
Any ideas what's causing this?
from dbt-checkpoint.
FWIW, I ended up not using the GHA and just installed precommit in the workflow so I could call the hooks I specifically wanted, which works for me:
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install pre-commit
run: pip install pre-commit
- name: Get changed files
id: get_file_changes
uses: trilom/[email protected]
with:
output: ' '
- name: run pre-commit-dbt added files
if: steps.get_file_changes.outputs.files_added != '' && always()
shell: bash
run: |
pre-commit run check-script-has-no-table-name --files ${{ steps.get_file_changes.outputs.files_added }} |
from dbt-checkpoint.
Thank you @miki-lwy I will take a look
from dbt-checkpoint.
i faced the same issue
from dbt-checkpoint.
I'm also getting this issue, running the latest commit (cc144b9). Is there a workaround to this error for the time being?
from dbt-checkpoint.
hi @tomsej any chance you had a chance to take a look at this ? thanks for making this package - the github actions would really help us
from dbt-checkpoint.
This issue was also a problem for me. I'm planning to use the workaround noted here.
from dbt-checkpoint.
FWIW, I ended up not using the GHA and just installed precommit in the workflow so I could call the hooks I specifically wanted, which works for me:
steps: - name: Checkout branch uses: actions/checkout@v2 - name: Setup python uses: actions/setup-python@v4 with: python-version: '3.9' - name: Install pre-commit run: pip install pre-commit - name: Get changed files id: get_file_changes uses: trilom/[email protected] with: output: ' ' - name: run pre-commit-dbt added files if: steps.get_file_changes.outputs.files_added != '' && always() shell: bash run: | pre-commit run check-script-has-no-table-name --files ${{ steps.get_file_changes.outputs.files_added }} |
Is there a way to use this workaround and still pass the env_vars to my profiles.yml file?
from dbt-checkpoint.
Running into the same issue. Wondering if we will se an update here at any point soon?
from dbt-checkpoint.
Related Issues (20)
- run, compile, test should use same dbt profile.
- replace-script-table-names fails on EXTRACT(datepart FROM column)
- create check-exposure-has-meta-keys HOT 1
- allow extra keys in check-sources-has-meta-keys HOT 1
- Add skip functionality to "dbt-deps" hook
- Support for multiple data types for check-column-name-contract hook HOT 1
- `check-column-name-contract` doesn't output the name of the files HOT 1
- check-model-name-contract support for snapshots HOT 1
- Typo in docs for how to use --exclude
- Following the instructions for github actions failed (re: profile.yml)
- unable to exclude specific model from pre-commit
- check_source_has_all_columns reports failure due to use of lower() HOT 1
- Support multiple dbt project roots in a single repo HOT 2
- check-script-ref-and-source erroneously checks refs in comments
- Generate docs for only the staged/changed model(s) HOT 3
- `check-source-has-tests` has the wrong argument documented for test count HOT 1
- check-source-loaded-at-field-is-valid
- check-column-name-contract (and maybe other checkpoints based on Catalog) does not work with Versioned models HOT 1
- dbt-docs-generate speedup possibility with --no-compile? HOT 9
- check-script-ref-and-source hook not accounting for versioned models
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dbt-checkpoint.