-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[release-2.25] pre-commit: make hooks self contained + ci config #11359
Conversation
/ok-to-test |
/hold |
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)
6d1084c
to
ead0948
Compare
/unhold |
Continue to upstream the current CI. |
/approve |
[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 |
This is an automated cherry-pick of #11226
/assign tico88612