Copilot commented on code in PR #50:
URL: https://github.com/apache/solr-orbit/pull/50#discussion_r3661328581
##########
run.sh:
##########
@@ -34,28 +34,14 @@ install_solrorbit () {
if [[ -f $1 && -x $1 ]]; then return; fi
fi
- # Workaround system pip conflicts, https://github.com/pypa/pip/issues/5599
- if [[ ${IN_VIRTUALENV} == 0 ]]; then
- python3 -m pip install --quiet --user --upgrade --editable .[develop]
- else
- python3 -m pip install --quiet --upgrade --editable .[develop]
- fi
+ uv sync --extra develop --quiet
Review Comment:
`run.sh` calls `uv` directly; if `uv` is not installed (or not on PATH),
this will fail with a generic "command not found" and no guidance. Add an
explicit check with a clear install message before running `uv sync`.
##########
run.sh:
##########
@@ -120,18 +106,5 @@ export THESPLOG_THRESHOLD="INFO"
# Provide a consistent binary name to the user and hide the fact that we call
another binary under the hood.
export BENCHMARK_ALTERNATIVE_BINARY_NAME=$(basename "$0")
-if [[ $IN_VIRTUALENV == 0 ]]
-then
- BENCHMARK_ROOT=$(python3 -c "import site; print(site.USER_BASE)")
- BENCHMARK_BIN=${BENCHMARK_ROOT}/bin/${BINARY_NAME}
- install_solrorbit "${BENCHMARK_BIN}"
- if [[ -x $BENCHMARK_BIN ]]; then
- ${BENCHMARK_BIN} "$@"
- else
- echo "Cannot execute ${HUMAN_NAME} in ${BENCHMARK_BIN}."
- fi
-else
- install_solrorbit "${BINARY_NAME}"
-
- ${BINARY_NAME} "$@"
-fi
+install_solrorbit
+uv run "${BINARY_NAME}" "$@"
Review Comment:
`install_solrorbit` includes logic to skip syncing when an existing
executable path is provided, but it’s now always called with no args. That
makes `uv sync` run on every invocation even when `.venv` is already populated,
adding startup overhead.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]