weiqingy commented on issue #980:
URL: https://github.com/apache/flink-agents/issues/980#issuecomment-5227754123

   Scope note, since the PR has outgrown the five call sites listed above.
   
   Review feedback pointed out that rewriting the `pip` calls alone does not 
remove the PATH dependency. Each of these scripts installs a tool and then 
invokes it by bare name, and the console scripts of anything pip installs land 
in a directory that may not be on PATH either. So `tools/build.sh` now clears 
line 104 and dies on line 105 instead:
   
   ```
   ./tools/build.sh: line 105: uv: command not found
   ```
   
   #979 therefore also routes the invocations through the interpreter: the five 
`uv` calls in `build.sh`, the two `ruff` calls in the `lint.sh` fallback, and 
the three `pytest` calls in the `ut.sh` fallback. Fifteen sites in total rather 
than five.
   
   The rule it follows is that the interpreter form is used only where the same 
script pip installed that tool into the same interpreter earlier in the same 
run, since that is what guarantees the module is importable at the point of 
use. `uv` calls behind a `command -v uv` guard stay bare, because those run 
only when uv is already on PATH and a standalone uv install ships no importable 
module.
   
   Two things found along the way that are out of scope here and will get their 
own issue:
   
   `tools/e2e.sh` calls `uv` by bare name seven times with no guard at all, so 
it breaks outright without uv on PATH. It needs a guard rather than the 
interpreter form, because it never installs uv itself.
   
   The `tools/ut.sh` pip fallback passes `-o log_cli_level=OFF` while the uv 
branch passes `CRITICAL`. pytest 9.0.3 rejects `OFF` and exits 4, so that 
branch fails regardless of how pytest is invoked.
   


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