weiqingy commented on code in PR #888:
URL: https://github.com/apache/flink-agents/pull/888#discussion_r3556850036


##########
tools/install.sh:
##########
@@ -1576,7 +1586,7 @@ validate_python_bin() {
     py_major="${py_version_output%%.*}"
     py_minor="${py_version_output##*.}"
 
-    if [[ "$py_major" -ne 3 ]] || [[ "$py_minor" -lt 10 ]] || [[ "$py_minor" 
-ge 12 ]]; then
+    if [[ "$py_major" -ne 3 ]] || [[ "$py_minor" -lt 10 ]] || [[ "$py_minor" 
-ge "$(python_minor_ceiling)" ]]; then

Review Comment:
   This line is where the interpreter check starts depending on the selected 
release — and once `resolve_python` has run, the confirm screen can still 
change that release out from under it. `edit_plan_interactive`'s 
`flink_agents_version)` arm reassigns `FLINK_AGENTS_VERSION` 
(`install.sh:1112-1114` → `693`) without re-checking the already-resolved 
`PYTHON_BIN`, unlike the `enable_pyflink)` arm right below it, which re-runs 
`resolve_python` when its dependent changes (`install.sh:1153-1160`). 
Concretely: a user on Python 3.12 accepts the new `0.3.0` default (validates 
here, ceiling 13), then at the confirm screen edits the version down to 
`0.2.1`; `setup_python_env` then runs `pip install flink-agents==0.2.1` 
(`install.sh:1434`), whose `requires-python` is `<3.12`, and the install fails 
after the plan looked good. Before this PR the interpreter was independent of 
the release, so this window didn't exist. Would re-validating `PYTHON_BIN` 
after a version edit — mirroring the `ena
 ble_pyflink)` arm — catch the mismatch at plan time rather than mid-install?



-- 
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]

Reply via email to