Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock UV version to previous working version #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Goondrious
Copy link

@Goondrious Goondrious commented Nov 8, 2024

Short term fix to get some things deployed, but looks like new uv download link is pulling 0.5.0 compared to yesterday's 0.4.30 so I'm testing out if this downgrade works.

Will hopefully just fix 0.5.0 after (maybe cuz Cargo home directory no longer used?)

@kishaningithub
Copy link
Owner

What is the issue you are facing with 0.5.0 ? Can you share some insights on that ?

@d-olivas
Copy link

d-olivas commented Nov 8, 2024

Hi,

I'm experiencing an issue when using the setup-python-amazon-linux action in my workflow. It worked fine yesterday, but without any changes to the workflow or my runners, it started failing today.

The problem I'm having is when running the setup-python step (

- id: setup-python
), it fails with an error "uv: command not found".

I'm not sure if this is related to the issue @Goondrious is referring to in this PR, but I think it is likely related.

@kishaningithub
Copy link
Owner

@Goondrious Can you kindly look into the failing tests ?

@Goondrious
Copy link
Author

What is the issue you are facing with 0.5.0 ? Can you share some insights on that ?

Confirming that it is the same issue as @d-olivas. The downgrade worked for our deploys, but I will look into the failing tests @kishaningithub !

@rpomoni
Copy link

rpomoni commented Nov 11, 2024

Same error here when installing python 3.11. Here's the log output:

Run echo "Installing uv.. HOME=${HOME}"
  echo "Installing uv.. HOME=${HOME}"
  curl -LsSf https://astral.sh/uv/install.sh | bash --login
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
Installing uv.. HOME=/home/ec2-user
downloading uv 0.5.1 x86_64-unknown-linux-gnu
no checksums to verify
installing to /home/ec2-user/.local/bin
  uv
  uvx
everything's installed!
Run desired_python_version=$(${GITHUB_ACTION_PATH}/find-desired-python-version.sh "3.11" ".python-version")
desired_python_version=3.11
Run desired_python_version="3.11"
  desired_python_version="3.11"
  echo "installation_directory=${HOME}/.setup-python-amazon-linux/.python-versions/${desired_python_version}" | tee -a "${GITHUB_OUTPUT}"
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
installation_directory=/home/ec2-user/.setup-python-amazon-linux/.python-versions/3.11
Run installation_directory="/home/ec2-user/.setup-python-amazon-linux/.python-versions/3.11"
  installation_directory="/home/ec2-user/.setup-python-amazon-linux/.python-versions/3.11"
  desired_python_version="3.11"
  
  uv venv --python "${desired_python_version}" "${installation_directory}"
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
/opt/actions-runner/_work/_temp/7bdd3949-3cc5-45d7-8931-8e6500baedfd.sh: line 4: uv: command not found
Error: Process completed with exit code 1[27](https://github.com/mailupinc/bee-beepro-backend/actions/runs/11775225563/job/32795641198#step:4:30).

It seems that uv is correctly installed under /home/ec2-user/.local/bin but later when it's called in the command uv venv --python "${desired_python_version}" "${installation_directory}" bash fails to find the executable

@Giannandrea
Copy link

@kishaningithub following @Goondrious comment it looks like uv changed the installation target dir from $CARGO_HOME or ~/.cargo/bin to $XDG_BIN_HOME, $XDG_DATA_HOME/../bin, or ~/.local/bin. In theory the script should add the target dir in the path but something fails. I wouldn't investigate more because i would suggest to use the official action to avoid similar issue in the future.

The official action is here https://github.com/astral-sh/setup-uv and can be used in that way
If you agree this would fix the issue unblocking our actions.

- name: Install the latest version of uv
  uses: astral-sh/setup-uv@v3
  with:
    version: "latest"

@kishaningithub
Copy link
Owner

kishaningithub commented Nov 11, 2024

@Goondrious @d-olivas @Giannandrea @rpomoni Have released a new version v1.0.14 which i think should fix the above issues. Kindly check and let me know.

@kishaningithub
Copy link
Owner

@Goondrious Assuming the new version of this action is working for you, shall i close this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants