MonkeyCanCode commented on code in PR #2228:
URL: https://github.com/apache/polaris/pull/2228#discussion_r2250276008
##########
polaris:
##########
@@ -68,4 +68,4 @@ if [ -z "$VIRTUAL_ENV" ] || [ "$(realpath "$VIRTUAL_ENV")" !=
"$(realpath "${dir
fi
export SCRIPT_DIR="${dir}"
-exec polaris "$@"
+env PYTHONPATH=client/python SCRIPT_DIR="$dir"
"${dir}"/polaris-venv/bin/python3 client/python/cli/polaris_cli.py "$@"
Review Comment:
@eric-maynard
I think it may be better to ask users to run `polaris --repair` instead add
back the original code above as this will be a blocker for us to move away from
`polaris` bash script:
```
➜ polaris git:(main) ./polaris --repair
➜ polaris git:(main) ./polaris
Traceback (most recent call last):
File "/Users/yong/Desktop/GitHome/test/polaris/polaris-venv/bin/polaris",
line 6, in <module>
sys.exit(main())
~~~~^^
File
"/Users/yong/Desktop/GitHome/test/polaris/client/python/cli/polaris_cli.py",
line 219, in main
PolarisCli.execute()
~~~~~~~~~~~~~~~~~~^^
File
"/Users/yong/Desktop/GitHome/test/polaris/client/python/cli/polaris_cli.py",
line 70, in execute
client_builder = PolarisCli._get_client_builder(options)
File
"/Users/yong/Desktop/GitHome/test/polaris/client/python/cli/polaris_cli.py",
line 175, in _get_client_builder
raise Exception(
...<5 lines>...
)
Exception: Please provide credentials via either --client-id &
--client-secret or --access-token. Alternatively, you may set the environment
variables CLIENT_ID & CLIENT_SECRET.
➜ polaris git:(main) cat polaris | grep exec
exec polaris "$@"
```
##########
polaris:
##########
@@ -68,4 +68,4 @@ if [ -z "$VIRTUAL_ENV" ] || [ "$(realpath "$VIRTUAL_ENV")" !=
"$(realpath "${dir
fi
export SCRIPT_DIR="${dir}"
-exec polaris "$@"
+env PYTHONPATH=client/python SCRIPT_DIR="$dir"
"${dir}"/polaris-venv/bin/python3 client/python/cli/polaris_cli.py "$@"
Review Comment:
This one should work as it is now using the installed package instead of
invoking the class directly. Do we have a reproducible or I can take a closer
look a bit later this weekend (assuming the user removes the old virtualenv and
setup the new one)
--
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]