Skip to content

chore(dev): replace pre-commit with prek - #415

Merged
joshuarli merged 2 commits into
mainfrom
refactor/replace-pre-commit-with-prek
Nov 30, 2026
Merged

joshuarli merged 2 commits into
mainfrom
refactor/replace-pre-commit-with-prek

Conversation

@joshuarli

Copy link
Copy Markdown
Member

Replaces pre-commit with prek as the dev hook runner.

Both project locks (sentry_streams and sentry_streams_k8s) drop virtualenv and its transitive dependencies. Supported hooks move to prek's builtin repo while non-builtin hooks stay remote; the Makefile target, .envrc, CI, and AGENTS.md now use prek. Both locks were regenerated against the internal sfw index to preserve their existing sources.

Verified: uv lock --check in both projects, prek validate-config .pre-commit-config.yaml, and the migrated hooks via prek run. The full local run also reports pre-existing Helm-template YAML errors and a missing local mypy binary; both reproduce with the original config on main, and CI activates the venv.

Refs DI-2940.

pre-commit pulls virtualenv and its command-injection advisories into the dev lock. prek is pre-commit-compatible and manages hook environments with uv, so virtualenv and its transitive dependencies drop out entirely.
@joshuarli
joshuarli requested a review from a team as a code owner November 23, 2026 18:12
@linear-code

linear-code Bot commented Nov 23, 2026

Copy link
Copy Markdown

DI-2940

Re-resolve both lockfiles instead of hand-merging them so pre-commit and
virtualenv, including main's filelock bump pulled in by pre-commit, stay out
while main's other dependency bumps are kept.
@joshuarli
joshuarli merged commit 3f04c2c into main Nov 30, 2026
23 checks passed
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

Successfully merging this pull request may close these issues.

2 participants