Skip to content

pre-push hook runs the full multi-distro suite and gets bypassed #231

Description

@pierre-warnier

hooks/pre-push runs, in Docker, before git transfers anything:

docker compose run debian cargo fmt --all --check
docker compose run debian cargo clippy --workspace --all-targets -- -D warnings
docker compose run debian cargo test --workspace
docker compose run alpine cargo test --workspace
docker compose run fedora cargo test --workspace

That is several minutes on every push, including pushes that transfer almost nothing — pushing the 0.2.2 tag moved one object and still blocked for over two minutes.

The predictable result is that it gets bypassed. Every push in the recent batch of work used --no-verify, because the same checks had just been run manually. A hook that is always skipped provides no protection while still costing time whenever someone forgets to skip it.

Options, roughly in order of preference:

  1. Scope it to what a push can actually break and what CI does not already cover — CI runs fmt/clippy/test on every PR, so the hook duplicates it.
  2. Skip entirely for pushes that carry no commits (tags, branch deletions).
  3. Run one distro locally and leave the matrix to CI, which has retries and runs the three distros in parallel.
  4. Drop it and rely on CI, which is the actual gate.

Worth deciding rather than leaving a hook everyone routes around.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions