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

On CI systems running in AWS, XtensaRust::parse_version() repeatedly times out and panics espup #347

Closed
codyps opened this issue Sep 7, 2023 · 2 comments · Fixed by #352
Assignees
Labels
bug Something isn't working

Comments

@codyps
Copy link

codyps commented Sep 7, 2023

Bug description

When running espup install --extended-llvm --name esp-1.72.0.0 --toolchain-version 1.72.0.0 --export-file path/to/file/export-esp.sh on some build automation systems in AWS, the XtensaRust::parse_version() call repeatedly times out and panics.

Log excerpt:

[2023-09-07T00:28:31.195Z] #14 140.3    Compiling hyper-tls v0.5.0
[2023-09-07T00:28:31.195Z] #14 140.4    Compiling reqwest v0.11.18
[2023-09-07T00:28:31.195Z] #14 140.9    Compiling espup v0.5.0
[2023-09-07T00:28:31.195Z] #14 150.0     Finished release [optimized] target(s) in 26.59s
[2023-09-07T00:28:31.195Z] #14 150.0   Installing /usr/local/cargo/bin/espup
[2023-09-07T00:28:31.195Z] #14 150.0    Installed package `espup v0.5.0` (executable `espup`)
[2023-09-07T00:28:31.195Z] #14 150.7 thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { error: GithubQuery, total_delay: 500ms, tries: 6 }', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/espup-0.5.0/src/toolchain/mod.rs:298:6
[2023-09-07T00:28:31.195Z] #14 150.7 stack backtrace:
[2023-09-07T00:28:31.195Z] #14 150.7 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

To Reproduce

I'm not sure exactly how to reproduce this: locally, espup works. I suspect we're hitting some weird github API rate limiting

Expected behavior

espup successfully installs the toolchain

Environment

  • OS: ubuntu 20.04
  • espup version: 0.5.0

Additional context

After examining XtensaRust::parse_version()'s usage, it seemed like given we were passing a full version, we have no need to run the github api query to retrieve the list of all the esp-rs releases. Removing that github api call and using the version string directly (ie: removing the call the parse_version() entirely) fixed the issue for us.

I recommend these options, in order of preference:

  1. remove the parse_version() call entirely.
  2. Don't call parse_version() if we have a complete version string
  3. Don't fail github's API is flaky, just try using the version directly.

Commit we're using right now, for reference: junelife@30a50d0

@codyps codyps added the bug Something isn't working label Sep 7, 2023
@github-project-automation github-project-automation bot moved this to Todo in esp-rs Sep 7, 2023
@SergioGasquez SergioGasquez self-assigned this Sep 13, 2023
@SergioGasquez SergioGasquez linked a pull request Sep 13, 2023 that will close this issue
@SergioGasquez
Copy link
Member

Thanks for opening the issue! GH Actions also suffered from this in the past, see esp-rs/xtensa-toolchain#15. I've just created #352 to provide a solution, do you mind verifying it?

cargo uninstall espup
cargo install espup --git https://github.com/SergioGasquez/espup --branch feat/parse-version-skip
espup install --extended-llvm --name esp-1.72.0.0 --toolchain-version 1.72.0.0 --skip_version_parse --export-file path/to/file/export-esp.sh 

@SergioGasquez SergioGasquez moved this from Todo to In Progress in esp-rs Sep 13, 2023
@codyps
Copy link
Author

codyps commented Sep 13, 2023

That looks like a good option for me. It runs fine (with the option name fixed to use -: espup install --extended-llvm --name esp-1.72.0.0 --toolchain-version 1.72.0.0 --skip-version-parse --export-file path/to/file/export-esp.sh)

@github-project-automation github-project-automation bot moved this from In Progress to Done in esp-rs Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants