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

Update pre-commit to use CI base image #1307

Merged

Conversation

aurianer
Copy link
Contributor

@aurianer aurianer commented Nov 1, 2024

  • Simplifies the pre-commit script
  • Use pika-ci-base image to have the updated clang-format and cmake-format version

The previous pre-commit script supposed that we had clang-format and cmake-format installed on the system. It also supposed that we update it each time we decide to upgrade the versions.
This PR is using the docker image used in CI, pulls it if it's not available locally. The requirement here is podman, but the user can also remove podman from the pre-commit script if he prefers, the simplified commands run within podman can be run locally

@aurianer aurianer force-pushed the update_precommit_to_use_ci_base_image branch from d817943 to 5855103 Compare November 1, 2024 07:52
Copy link

codacy-production bot commented Nov 1, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.11% (target: -1.00%) (target: 90.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (1a62925) 18285 13790 75.42%
Head commit (d331450) 18285 (+0) 13810 (+20) 75.53% (+0.11%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1307) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Copy link
Contributor

@msimberg msimberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments, looks good to me otherwise.

@biddisco might want to have a look as well since I think he's also using the pre-commit hook. If there's a preference for either we can also consider having both the old and the new version as alternatives (though only option is better of course).

tools/pre-commit Outdated Show resolved Hide resolved
tools/pre-commit Outdated Show resolved Hide resolved
tools/pre-commit Outdated Show resolved Hide resolved
tools/pre-commit Outdated Show resolved Hide resolved
tools/pre-commit Outdated Show resolved Hide resolved
tools/pre-commit Outdated Show resolved Hide resolved
tools/pre-commit Outdated Show resolved Hide resolved
@aurianer aurianer force-pushed the update_precommit_to_use_ci_base_image branch from 5855103 to a5d72bb Compare November 4, 2024 22:24
@aurianer aurianer force-pushed the update_precommit_to_use_ci_base_image branch from a5d72bb to d331450 Compare November 9, 2024 22:32
@msimberg msimberg added this to the 0.31.0 milestone Nov 11, 2024
@msimberg msimberg merged commit 9e8ef84 into pika-org:main Nov 11, 2024
37 checks passed
@biddisco
Copy link
Contributor

This is horrific - why would you require podman to be run to use a commit hook?

@msimberg
Copy link
Contributor

This is horrific

Please try to be a bit more respectful next time.

why would you require podman to be run to use a commit hook?

It's explained quite clearly in the PR description. If you have more specific questions, please do ask.

msimberg added a commit to msimberg/pika that referenced this pull request Nov 13, 2024
…it_to_use_ci_base_image" but keep podman-based pre-commit hook in pre-commit-podman

This reverts commit 9e8ef84, reversing
changes made to 1a62925.
msimberg added a commit to msimberg/pika that referenced this pull request Nov 13, 2024
…it_to_use_ci_base_image" but keep podman-based pre-commit hook in pre-commit-podman

This reverts commit 9e8ef84, reversing
changes made to 1a62925.
msimberg added a commit that referenced this pull request Nov 13, 2024
Revert #1307 but keep podman-based pre-commit hook in pre-commit-podman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants