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

pre-commit CI fails on hooks with 'local' dependencies #254

Closed
alyssadai opened this issue Jan 11, 2024 · 0 comments · Fixed by #256
Closed

pre-commit CI fails on hooks with 'local' dependencies #254

alyssadai opened this issue Jan 11, 2024 · 0 comments · Fixed by #256
Assignees
Labels
flag:discuss Flag issue that needs to be discussed before it can be implemented. quick fix Minimal planning and/or implementation work required.

Comments

@alyssadai
Copy link
Contributor

alyssadai commented Jan 11, 2024

See https://results.pre-commit.ci/run/github/567874792/1704917018.maEjX3MAQWuRwegTX2LaDw for example.

One of the pre-commit hooks we have in this repo is docker-compose-check which checks for valid compose files by running docker compose config.

This works fine when pre-commit is run locally, but errors out in CI because docker compose can't be found.

One option would be to use the skip config option in the pre-commit-config.yaml to skip docker-compose-check in CI:
https://pre-commit.ci/#configuration-skip

  • in theor,y it should be possible to install docker compose in a github runner, but pre-commit CI itself doesn't actually use a GH workflow

Other options:

  • A no-longer-maintained pre-commit GH action: https://github.com/pre-commit/action
    • superseded by pre-commit.ci
    • cons: seems like there's little to no configurability? although from piecing together some of the git history (e.g., remove pushing behaviour pre-commit/action#164), it looks like it doesn't make automatic pushes to PRs at least, which I think is what we want
  • pre-commit.ci lite action: https://pre-commit.ci/lite
    • cons: only provides auto-fixing of PRs, which we don't need (and I can't find documentation on turning this option off/whether that is possible)

Relevant open issues in pre-commit.ci:

We should also ensure autofix_prs is False in this repo https://pre-commit.ci/#configuration-autofix_prs.

@alyssadai alyssadai added type:maintenance Upkeeping efforts & catch-up corrective improvements that are not Features nor Bugs and removed type:maintenance Upkeeping efforts & catch-up corrective improvements that are not Features nor Bugs labels Jan 11, 2024
@alyssadai alyssadai added flag:discuss Flag issue that needs to be discussed before it can be implemented. quick fix Minimal planning and/or implementation work required. labels Jan 11, 2024
@alyssadai alyssadai self-assigned this Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flag:discuss Flag issue that needs to be discussed before it can be implemented. quick fix Minimal planning and/or implementation work required.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant