-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
🔧 Problem Description
CI is failing on black formatting checks despite pre-commit hooks passing locally, indicating a version mismatch between different environments.
📋 Technical Details
Current State:
- Local black version: 25.1.0
- Pre-commit hook version: 23.12.1 (defined in
.pre-commit-config.yaml
) - CI environment: Unknown version (likely different from both above)
Impact:
- Code passes local pre-commit checks but fails CI
- Different black versions format code slightly differently
- Inconsistent developer experience
🚨 Specific Error
Run black --check clustrix/ tests/
would reformat /Users/runner/work/clustrix/clustrix/tests/test_cloud_providers_azure.py
Oh no! 💥 💔 💥
1 file would be reformatted, 53 files would be left unchanged.
Error: Process completed with exit code 1.
✅ Immediate Fix Applied
- Hash:
312a8be
- Fixed formatting in the specific file to unblock CI
🎯 Proper Solution Needed
We need to standardize black versions across all environments:
- Update
.pre-commit-config.yaml
to use a consistent black version - Pin black version in CI to match pre-commit hooks
- Document black version in development setup
🔍 Investigation Required
- Check what black version CI is actually using
- Determine the best black version to standardize on
- Update pre-commit configuration
- Test that pre-commit hooks catch what CI catches
📁 Related Files
.pre-commit-config.yaml
(line 3:rev: 23.12.1
)- CI configuration files
- Any developer documentation about code formatting
This ensures consistent code formatting across all development environments and prevents CI failures due to version mismatches.
Metadata
Metadata
Assignees
Labels
No labels