korbit-ai[bot] commented on code in PR #31313: URL: https://github.com/apache/superset/pull/31313#discussion_r1890948614
########## scripts/uv-pip-compile.sh: ########## @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +set -e + +ADDITIONAL_ARGS="$@" Review Comment: ### Missing UV Command Validation <sub></sub> <details> <summary>Tell me more</summary> ###### What is the issue? The script doesn't validate if the uv command exists before attempting to use it. ###### Why this matters If uv is not installed, the script will fail with a cryptic error message instead of providing a clear indication of the missing dependency. ###### Suggested change Add command validation after set -e: if ! command -v uv >/dev/null 2>&1; then echo "Error: uv command not found. Please install uv first." exit 1 fi </details> ###### Chat with Korbit by mentioning @korbit-ai, and give a 👍 or 👎 to help Korbit improve your reviews. <!--- korbi internal id:5ee21073-6d7b-433c-92e3-8d586ca6cbe5 --> ########## scripts/uv-pip-compile.sh: ########## @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +set -e + +ADDITIONAL_ARGS="$@" + +# Generate the requirements/base.txt file +uv pip compile pyproject.toml -c requirements/base.in -o requirements/base.txt $ADDITIONAL_ARGS Review Comment: ### Incorrect Input File Specification for Base Requirements <sub></sub> <details> <summary>Tell me more</summary> ###### What is the issue? The first command uses requirements/base.in as a constraint (-c) while it should be using it as an input file since it's the primary source for base.txt. ###### Why this matters Using base.in as a constraint instead of an input file means the dependencies specified in base.in might not be properly included in the final requirements file, potentially leading to missing dependencies. ###### Suggested change Replace the first command with: uv pip compile pyproject.toml requirements/base.in -o requirements/base.txt $ADDITIONAL_ARGS </details> ###### Chat with Korbit by mentioning @korbit-ai, and give a 👍 or 👎 to help Korbit improve your reviews. <!--- korbi internal id:c731d9ca-a451-4ca2-9c29-ae48b1badd83 --> -- 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]
