Skip to content

Failing Github Actions CI using install.sh - Listing more than one github download link - v0.35.0 #2483

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

Closed
3 tasks done
tyeth opened this issue Jan 2, 2024 · 6 comments · Fixed by #2485
Closed
3 tasks done
Assignees
Labels
conclusion: resolved Issue was resolved topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project

Comments

@tyeth
Copy link

tyeth commented Jan 2, 2024

Describe the problem

all our CI is failing and I've traced through, and it seems like the grep is failing, but more like the newlines are not being detected by grep (or the $APPLICATION_DIST is incorrectly set - but the first arduino.cc download attempt says otherwise). Works in windows (ignoring cut), and wsl fine, but not in github actions.
CI Output: logs_9.zip https://github.com/adafruit/Adafruit_Arcada/actions/runs/7388865095/job/20100744127#step:5:84
Which leads (via our ci script) to the grep listing more than one file here: https://github.com/arduino/arduino-cli/blob/master/install.sh#L171
I have no idea really, escaping or maybe the environment variables in actions are causing problems as the arch is detected and the commands work apart from that (there was some example of migrating to return stdout in a special github actions format instead).

Installing in /home/runner/work/Adafruit_Arcada/Adafruit_Arcada/bin
ARCH=64bit
OS=Linux
Using curl as download tool
Downloading https://downloads.arduino.cc/arduino-cli/arduino-cli_v0.35.0_Linux_64bit.tar.gz
Did not find a release for your system: Linux 64bit
Trying to find a release using the GitHub API.
Downloading https://github.com/arduino/arduino-cli/releases/download/v0.35.0/0.35.0-checksums.txt
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_configuration.schema.json
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_Linux_32bit.tar.gz
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_Linux_64bit.tar.gz
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_Linux_ARM64.tar.gz
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_Linux_ARMv6.tar.gz
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_Linux_ARMv7.tar.gz
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_macOS_64bit.tar.gz
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_macOS_ARM64.tar.gz
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_proto.zip
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_Windows_32bit.zip
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_Windows_64bit.msi
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_Windows_64bit.zip
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/CHANGELOG.md
Failed to install arduino-cli
Error: Process completed with exit code 3.

To reproduce

having setup paths etc run
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh

Expected behavior

Script installs Linux_x64bit release from github

Arduino CLI version

0.35.0

Operating system

Linux

Operating system version

23.04 maybe? github actions ubuntu-latest

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the nightly build
  • My report contains all necessary details
@tyeth tyeth added the type: imperfection Perceived defect in any part of project label Jan 2, 2024
@tyeth
Copy link
Author

tyeth commented Jan 2, 2024

At the advice of @brentru I'm tagging the people in the know... @cmaglie @facchinm @per1234 @alessio-perugini

@tyeth tyeth changed the title Failing Github Actions CI using install.sh Failing Github Actions CI using install.sh - Listing more than one download file result v0.35.0 Jan 2, 2024
@tyeth tyeth changed the title Failing Github Actions CI using install.sh - Listing more than one download file result v0.35.0 Failing Github Actions CI using install.sh - Listing more than one github download link - v0.35.0 Jan 2, 2024
@ozanges
Copy link

ozanges commented Jan 2, 2024

Hi,
The problem is in my case :
$APPLICATION_DIST = arduino-cli_v0.35.0_Linux_64bit.tar.gz

but we have

https://github.com/arduino/arduino-cli/releases/download/v0.35.0/0.35.0-checksums.txt
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_configuration.schema.json
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_Linux_32bit.tar.gz
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_Linux_64bit.tar.gz
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_Linux_ARM64.tar.gz
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_Linux_ARMv6.tar.gz
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_Linux_ARMv7.tar.gz
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_macOS_64bit.tar.gz
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_macOS_ARM64.tar.gz
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_proto.zip
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_Windows_32bit.zip
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_Windows_64bit.msi
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/arduino-cli_0.35.0_Windows_64bit.zip
https://github.com/arduino/arduino-cli/releases/download/v0.35.0/CHANGELOG.md

for echo "$BODY" | grep 'browser_' | cut -d\" -f4

So first var contains a v for arduino-cli_v0.35 but no v for second var $DOWNLOAD_URL (arduino-cli_0.35...)

According to install.sh script and wiki curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh -s -- 0.35.0 should be a temporary fix until the real fix

you can test with this Dockerfile under wsl2 with ubuntu updated

FROM debian:latest

RUN apt-get update \
    && export DEBIAN_FRONTEND=noninteractive \
    && apt-get -y install curl git

tyeth added a commit to tyeth/arduino-cli that referenced this issue Jan 2, 2024
tyeth added a commit to tyeth/arduino-cli that referenced this issue Jan 2, 2024
Address arduino#2483 in single place
@tyeth
Copy link
Author

tyeth commented Jan 2, 2024

Well deduced @ozanges, thanks, that unblocks me although I'd like to fix it ideally.
Not sure if it's okay to update the taskfile.yml to prepend v, as it seems the go routine getting the version via semver and drops the v prefix (skipping over quickly - not a go person). Alternatively the version.go file could be modified, or if undesired then the release-go-task.yml and publish-go-nightly-task.yml and publish-go-tester-task.yml could be modified instead.

@tyeth tyeth mentioned this issue Jan 2, 2024
6 tasks
@ozanges
Copy link

ozanges commented Jan 2, 2024

Thanks @tyeth for the quick fix. I will test it when PR will be validated.

@cmaglie
Copy link
Member

cmaglie commented Jan 3, 2024

Thanks for the prompt bug report!

We have fixed the install.sh in master branch, the problem should be fixed now.
Please reopen or comment here if the issue is still present.

@cmaglie cmaglie self-assigned this Jan 3, 2024
@ozanges
Copy link

ozanges commented Jan 3, 2024

Tested & fixed.
Thanks for your efficiency

@per1234 per1234 added conclusion: resolved Issue was resolved topic: infrastructure Related to project infrastructure labels Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants