yuqi1129 opened a new pull request, #12661: URL: https://github.com/apache/gravitino/pull/12661
### What changes were proposed in this pull request? In `mcp-server/build.gradle.kts`: 1. Invoke the formatters through their venv console scripts (`.venv/bin/isort`, `.venv/bin/black`) instead of `python -m <tool>`, via a small `venvExecutable(name)` helper that mirrors the existing `venvPython` Windows/POSIX handling. 2. Pin the installed versions (`black==26.5.1`, `isort==9.0.0`) instead of installing them unconstrained. ### Why are the changes needed? `isort` 9.0.0 no longer ships an `isort/__main__.py`, so `python -m isort` fails outright: ``` .venv/bin/python: No code object available for isort.__main__; 'isort' is a package and cannot be directly executed > Task :mcp-server:formatCheckPython FAILED ``` `installFormatTools` installed `black` and `isort` without version constraints, so CI resolved the new release as soon as it was published and every job that runs `formatCheckPython` started failing — including the backend integration test jobs, which run the check before the tests. Pinning also keeps a future `black` release from silently changing the format check outcome. Fix: #12660 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Locally on a clean venv: - `./gradlew :mcp-server:formatCheckPython` — BUILD SUCCESSFUL (`80 files would be left unchanged`); fails on `main` with the error above. - `./gradlew :mcp-server:formatApplyPython` — BUILD SUCCESSFUL, no files modified. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
