You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "Alchuang22-dev (via GitHub)" <gi...@apache.org> on 2026/04/27 06:17:28 UTC
[PR] [AINode] Fix AINode Poetry constraint [iotdb]
Alchuang22-dev opened a new pull request, #17554:
URL: https://github.com/apache/iotdb/pull/17554
## Description
AINode build reuses a cached virtual environment under `iotdb-ainode-build`. If the cached venv was created with a Python version that does not satisfy AINode’s Poetry constraint, for example Python 3.12 while `pyproject.toml` requires `>=3.11.0,<3.12.0`, the build fails later in `poetry lock` with an unclear error.
This also makes `mvn clean` insufficient for recovering from incompatible cached AINode build environments.
## Contents
- Add Maven property `ainode.cleanBuildCache`, defaulting to `false`.
- Pass the Maven property to `iotdb-core/ainode/build_binary.py` as `--clean-build-cache`.
- Add cross-platform AINode build cache cleanup in `build_binary.py`:
- macOS/Linux: `~/.cache/iotdb-ainode-build`
- Windows: `%LOCALAPPDATA%\iotdb-ainode-build`, with existing fallback behavior.
- Read the Python version constraint from `pyproject.toml`.
- Validate Python version before creating or reusing the cached venv.
- Fail early with a clear error message when the cached venv Python does not satisfy the project constraint.
## Usage
```bash
// clean python cache
mvn clean package -pl distribution -P with-ainode -am -DskipTests -Dainode.cleanBuildCache=true
```
## Verification
```bash
python3 -m py_compile iotdb-core/ainode/build_binary.py
python3 iotdb-core/ainode/build_binary.py --help
```
Also manually verified the current cached venv Python version satisfies `>=3.11.0,<3.12.0`.
## Notes
During local build investigation, PyInstaller emits repeated warnings/errors while scanning Conda metadata and broad PyTorch hidden imports. These appear unrelated to the cache cleanup/version validation change and should be handled separately after review.
PTAL.
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org