Skip to content

Commit

Permalink
pre-commit: don't run dvc in parallel (#3912)
Browse files Browse the repository at this point in the history
* pre-commit: use local hooks

* pre-commit: don't run dvc in parallel

By default pre-commit will try to run hooks in parallel, which results
in some dvc instances failing to acquire repo locks.

Fixes #3751
  • Loading branch information
efiop authored May 29, 2020
1 parent bb50fb8 commit f504245
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 8 deletions.
33 changes: 26 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,37 @@ repos:
repo: https://github.com/lovesegfault/beautysh
rev: master
- hooks:
- id: dvc-pre-commit
language_version: python3
- args:
- git-hook
- pre-commit
entry: dvc
id: dvc-pre-commit
language: system
name: DVC pre-commit
stages:
- commit
- id: dvc-pre-push
language_version: python3
verbose: true
require_serial: true
- args:
- git-hook
- pre-push
entry: dvc
id: dvc-pre-push
language: system
name: DVC pre-push
stages:
- push
require_serial: true
- always_run: true
args:
- git-hook
- post-checkout
entry: dvc
id: dvc-post-checkout
language_version: python3
language: system
minimum_pre_commit_version: 2.2.0
name: DVC post-checkout
stages:
- post-checkout
repo: https://github.com/iterative/dvc
rev: master
require_serial: true
repo: local
3 changes: 3 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
language: python
language_version: python3
name: DVC pre-commit
require_serial: true
stages:
- commit
verbose: true
Expand All @@ -17,6 +18,7 @@
language: python
language_version: python3
name: DVC pre-push
require_serial: true
stages:
- push
- always_run: true
Expand All @@ -29,5 +31,6 @@
language_version: python3
minimum_pre_commit_version: 2.2.0
name: DVC post-checkout
require_serial: true
stages:
- post-checkout
2 changes: 1 addition & 1 deletion scripts/ci/check_patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -x
set -e

pip install Pygments collective.checkdocs pre-commit
pip install Pygments collective.checkdocs pre-commit .

# stop the build if there are any readme formatting errors
python setup.py checkdocs
Expand Down

0 comments on commit f504245

Please sign in to comment.