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

[release-2.25] pre-commit: make hooks self contained + ci config #11359

Conversation

k8s-infra-cherrypick-robot

This is an automated cherry-pick of #11226

/assign tico88612

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 7, 2024
@k8s-ci-robot k8s-ci-robot requested review from cyclinder and oomichi July 7, 2024 03:56
@tico88612
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jul 7, 2024
@tico88612
Copy link
Member

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 7, 2024
VannTen added 11 commits July 11, 2024 09:34
This pre-commit does not require prerequisite on the host, making it
easier to run in CI workflows.
This way, the hook is self contained and does not depend on a previous
virtualenv installation.
- ansible-syntax-check
- tox-inventory-builder
- jinja-syntax-check
- Remove dependency of pydblite which fails to setup on recent pythons
- Discard shell script and put everything into pre-commit
- markdownlint (manual fix)
- end-of-file-fixer
- requirements-txt-fixer
- trailing-whitespace
client9/misspell is unmaintained, and has been forked by the golangci
team, see client9/misspell#197 (comment).

They haven't yet added a pre-commit config, so use my fork with the
pre-commit hook config until the pull request is merged.
Use gitlab dynamic child pipelines feature to have one source of truth
for the pre-commit jobs, the pre-commit config file.

Use one cache per pre-commit. This should reduce the "fetching cache"
time steps in gitlab-ci, since each job will have a separate cache with
only its hook installed.
Use a style file as recommended by upstream. This makes for only one
source of truth.
Conserve previous upstream default for MD007 (upstream default changed
here markdownlint/markdownlint#373)
@k8s-infra-cherrypick-robot k8s-infra-cherrypick-robot force-pushed the cherry-pick-11226-to-release-2.25 branch from 6d1084c to ead0948 Compare July 11, 2024 09:34
@tico88612
Copy link
Member

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 11, 2024
@tico88612
Copy link
Member

Continue to upstream the current CI.
/lgtm
/assign yankay

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 11, 2024
@yankay
Copy link
Member

yankay commented Jul 12, 2024

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: k8s-infra-cherrypick-robot, yankay

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 12, 2024
@k8s-ci-robot k8s-ci-robot merged commit 9b122fb into kubernetes-sigs:release-2.25 Jul 12, 2024
78 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants