-
Notifications
You must be signed in to change notification settings - Fork 31
CLOUDP-301527 - add precommit and apply #642
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
base: master
Are you sure you want to change the base?
Conversation
d3ddcb8 to
53ed895
Compare
This branch contains only the core implementation files for review. The full PR (#642) includes additional auto-formatted files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
This branch contains only the core implementation files for review. The full PR (#642) includes additional auto-formatted files.
922b4cd to
c3113c3
Compare
MCK 1.6.1 Release NotesBug Fixes
Other Changes
|
| @@ -0,0 +1,213 @@ | |||
| #!/usr/bin/env bash | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thyis is mostly cp and paste from pre-commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in later pr i plan to enable newlines and trailing whitespace fixer, but then we will need to ensure that all generated files follow this - otherwise, pre-commit will fail if pre-commit needs to fix it
scripts/dev/generate_files.sh
Outdated
| source scripts/dev/set_env_context.sh | ||
| source scripts/funcs/printing | ||
|
|
||
| # Strip trailing whitespace from files to ensure clean generation output |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we don't do this, then we generate and then pre-commit runs and fixes them and then it fails as it changed something
f4fde10 to
1c4f4be
Compare
| # yamllint configuration file | ||
| # See https://yamllint.readthedocs.io/en/stable/configuration.html | ||
|
|
||
| extends: default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generated to match what we currently have
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
later prs can fix all of them. I decided to not do this in this PR as this would basically fix all files
224f8a2 to
d68a102
Compare
…framework This commit migrates from the custom .githooks/pre-commit bash script to the official pre-commit framework (https://pre-commit.com). Changes: - Add .pre-commit-config.yaml with all existing hooks migrated - Add .yamllint.yaml for YAML linting configuration - Create scripts/dev/generate_files.sh - extracted file generation logic - Create scripts/dev/regenerate_multicluster_rbac.sh - extracted RBAC regeneration - Simplify .githooks/pre-commit to delegate to pre-commit framework - Update scripts/evergreen/check_precommit.sh for CI integration - Update Makefile precommit targets - Add pre-commit to requirements.txt - Fix prepare-openshift-bundles-for-e2e.sh to call generate_files.sh directly - Fix validate_snippets.py to ignore git-ignored directories - Fix pyproject.toml isort config to use line_length=120 (matching black) Note: trailing-whitespace and end-of-file-fixer hooks are commented out for now (they modify 200+ files). These will be enabled in a follow-up PR.
be1c93a to
0b8d1f6
Compare
Update generate_files.sh to run all generation/validation jobs concurrently for faster execution. The script: - Runs all independent jobs in background - Properly handles dependency: generate_standalone_yaml waits for update_release_json and update_values_yaml_files to complete first - Prefixes job output for easy debugging - Reports failures with job names and PIDs
Summary
core changes (out of all files): can be seen in the first commit, all the subsequent commits are fixing those
Next
Proof of Work
Checklist
skip-changeloglabel if not needed