HerenderKumar opened a new pull request, #69894: URL: https://github.com/apache/airflow/pull/69894
With `venv_cache_path` set, the venv cache key of `PythonVirtualenvOperator` only reflects the requirements as written. Unpinned requirements (e.g. `pandas` or `boto3>=1.30`) therefore never pick up new upstream releases once a cached venv exists, and different workers can silently freeze different resolutions. This adds an opt-in `hash_resolved_requirements` flag (off by default, following the maintainer guidance in the issue discussion). When enabled, the operator resolves the requirements without installing them (`uv pip compile`, or `pip install --dry-run --report` with the pip install method) at the start of each task run and includes the resolved pins in the cache hash. An unchanged resolution keeps reusing the cached venv, a changed one builds a new immutable cached venv. Resolution failures raise a dedicated `RequirementsResolutionError` instead of silently reusing a possibly stale environment. The per-run resolution overhead and the accumulation of cached venvs are documented in the operator guide. closes: #41328 --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Fable 5) Generated-by: Claude Code (Fable 5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
