Python pre-commit pipeline to enforce best practices.
To enforce python best practices I propose a pre-commit pipeline with black and flake8.
Code-Reviewer Section
The general pull request guidelines can be found here.
Please check each of the following things and check all boxes before accepting a PR.
- [ ] The PR has a description, explaining both the problem and the solution.
- [ ] The description mentions which forms of testing were done and the testing seems reasonable.
- [ ] Every function/class/actor that was touched is reasonably well documented.
For Release-Branches
If this PR is made against a release-branch, please also check the following:
- [ ] This change/bugfix is a cherry-pick from the next younger branch (younger
release-branchormainif this is the youngest branch) - [ ] There is a good reason why this PR needs to go into a release branch and this reason is documented (either in the description above or in a linked GitHub issue)
Doxense CI Report for Windows 10
- Commit ID: 6ea7609647b297cae3aa4c9be92fb5ce35ccb2cc
- Result: :heavy_check_mark: SUCCEEDED
- Build Logs (available for 30 days)
Result of foundationdb-pr on Linux CentOS 7
- Commit ID: 6ea7609647b297cae3aa4c9be92fb5ce35ccb2cc
- Duration 1:25:55
- Result: :white_check_mark: SUCCEEDED
- Error:
N/A - Build Logs (available for 30 days)
- Build Artifact (available for 30 days)
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
- Commit ID: 6ea7609647b297cae3aa4c9be92fb5ce35ccb2cc
- Duration 2:55:51
- Result: :x: FAILED
- Error:
Error while executing command: if $(grep -q -- "--- FAIL:" ${CODEBUILD_SRC_DIR}/fdb-kubernetes-tests/logs/*.log); then echo "TESTS FAILED SEE THESE LOGS:"; echo ; grep -l -- "--- FAIL:" ${CODEBUILD_SRC_DIR}/fdb-kubernetes-tests/logs/*.log; exit 1; fi. Reason: exit status 1 - Build Logs (available for 30 days)
- Build Artifact (available for 30 days)
Result of foundationdb-pr-clang on Linux CentOS 7
- Commit ID: 2d19905e4a9d6e6e172672deaf4451758970d83e
- Duration 0:21:39
- Result: :x: FAILED
- Error:
Error while executing command: ninja -v -C build_output -j ${NPROC} all packages strip_targets. Reason: exit status 1 - Build Logs (available for 30 days)
- Build Artifact (available for 30 days)
Doxense CI Report for Windows 10
- Commit ID: 2d19905e4a9d6e6e172672deaf4451758970d83e
- Result: :heavy_check_mark: SUCCEEDED
- Build Logs (available for 30 days)
Result of foundationdb-pr-macos on macOS BigSur 11.5.2
- Commit ID: 2d19905e4a9d6e6e172672deaf4451758970d83e
- Duration 0:50:36
- Result: :white_check_mark: SUCCEEDED
- Error:
N/A - Build Logs (available for 30 days)
- Build Artifact (available for 30 days)
Result of foundationdb-pr on Linux CentOS 7
- Commit ID: 2d19905e4a9d6e6e172672deaf4451758970d83e
- Duration 1:07:52
- Result: :white_check_mark: SUCCEEDED
- Error:
N/A - Build Logs (available for 30 days)
- Build Artifact (available for 30 days)
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
- Commit ID: 2d19905e4a9d6e6e172672deaf4451758970d83e
- Duration 2:26:21
- Result: :x: FAILED
- Error:
Error while executing command: if $(grep -q -- "--- FAIL:" ${CODEBUILD_SRC_DIR}/fdb-kubernetes-tests/logs/*.log); then echo "TESTS FAILED SEE THESE LOGS:"; echo ; grep -l -- "--- FAIL:" ${CODEBUILD_SRC_DIR}/fdb-kubernetes-tests/logs/*.log; exit 1; fi. Reason: exit status 1 - Build Logs (available for 30 days)
- Build Artifact (available for 30 days)
I did some more reading. I think this hook could be a great addition, the trailing-whitespace and end-of-file-fixer. I could also open a discussion about more potential hooks that could be added later. Would love to hear your thoughts on this.
EDIT: might be better to discuss this in the future so that we can start using this for #7033.
Doxense CI Report for Windows 10
- Commit ID: 4f4b2748bc93d74d81509d0a1522d8848e903dcb
- Result: :heavy_check_mark: SUCCEEDED
- Build Logs (available for 30 days)
Result of foundationdb-pr-clang on Linux CentOS 7
- Commit ID: 4f4b2748bc93d74d81509d0a1522d8848e903dcb
- Duration 0:22:48
- Result: :x: FAILED
- Error:
Error while executing command: ninja -v -C build_output -j ${NPROC} all packages strip_targets. Reason: exit status 1 - Build Logs (available for 30 days)
- Build Artifact (available for 30 days)
I did some more reading. I think this hook could be a great addition, the
trailing-whitespaceandend-of-file-fixer. I could also open a discussion about more potential hooks that could be added later. Would love to hear your thoughts on this.EDIT: might be better to discuss this in the future so that we can start using this for #7033.
I'd be open to more pre-commit hooks, but let's leave that out of scope for this PR
Result of foundationdb-pr-clang on Linux CentOS 7
- Commit ID: 3ba287807d6726ea5965faeea2f18c0e160a016f
- Duration 0:22:09
- Result: :x: FAILED
- Error:
Error while executing command: ninja -v -C build_output -j ${NPROC} all packages strip_targets. Reason: exit status 1 - Build Logs (available for 30 days)
- Build Artifact (available for 30 days)
Doxense CI Report for Windows 10
- Commit ID: 3ba287807d6726ea5965faeea2f18c0e160a016f
- Result: :heavy_check_mark: SUCCEEDED
- Build Logs (available for 30 days)
Result of foundationdb-pr on Linux CentOS 7
- Commit ID: 4f4b2748bc93d74d81509d0a1522d8848e903dcb
- Duration 1:19:43
- Result: :white_check_mark: SUCCEEDED
- Error:
N/A - Build Logs (available for 30 days)
- Build Artifact (available for 30 days)
Result of foundationdb-pr on Linux CentOS 7
- Commit ID: 3ba287807d6726ea5965faeea2f18c0e160a016f
- Duration 1:02:50
- Result: :white_check_mark: SUCCEEDED
- Error:
N/A - Build Logs (available for 30 days)
- Build Artifact (available for 30 days)
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
- Commit ID: 4f4b2748bc93d74d81509d0a1522d8848e903dcb
- Duration 2:45:34
- Result: :x: FAILED
- Error:
Error while executing command: if $(grep -q -- "--- FAIL:" ${CODEBUILD_SRC_DIR}/fdb-kubernetes-tests/logs/*.log); then echo "TESTS FAILED SEE THESE LOGS:"; echo ; grep -l -- "--- FAIL:" ${CODEBUILD_SRC_DIR}/fdb-kubernetes-tests/logs/*.log; exit 1; fi. Reason: exit status 1 - Build Logs (available for 30 days)
- Build Artifact (available for 30 days)
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
- Commit ID: 3ba287807d6726ea5965faeea2f18c0e160a016f
- Duration 2:43:35
- Result: :x: FAILED
- Error:
Error while executing command: if $(grep -q -- "--- FAIL:" ${CODEBUILD_SRC_DIR}/fdb-kubernetes-tests/logs/*.log); then echo "TESTS FAILED SEE THESE LOGS:"; echo ; grep -l -- "--- FAIL:" ${CODEBUILD_SRC_DIR}/fdb-kubernetes-tests/logs/*.log; exit 1; fi. Reason: exit status 1 - Build Logs (available for 30 days)
- Build Artifact (available for 30 days)