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

Confusing error message with download-ci-llvm on old checkout #107506

Closed
Noratrieb opened this issue Jan 31, 2023 · 6 comments
Closed

Confusing error message with download-ci-llvm on old checkout #107506

Noratrieb opened this issue Jan 31, 2023 · 6 comments
Assignees
Labels
T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@Noratrieb
Copy link
Member

CI artifacts get deleted after a while, so using download-ci-llvm on old checkouts doesn't work. When the CI artifacts return a 404, bootstrap should note that the checkout might be outdated.

The current message is quite confusing, especially because it says "spurious failure", when it is not spurious at all.

spurious failure, trying again
downloading https://ci-artifacts.rust-lang.org/rustc-builds/8db8f48ea8c2443e969050fe4b6c829585048d5c/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz
curl: (22) The requested URL returned error: 404
@Noratrieb Noratrieb added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jan 31, 2023
@albertlarsan68
Copy link
Member

(Personal opinion) I think bootstrap should fall back to building LLVM with a warning if CI LLVM is not available and the option is set to if-available. If the option is set to true, it should error and print a possible solution. This would allow the current workaround for the tier2 w/ host tools debug-assertions build (added in #107234) to be deleted.

@albertlarsan68
Copy link
Member

In any way, the benefits of any fixes will only be seen 180 days after the fix is merged.
cc @rust-lang/bootstrap Please select:

  1. We just detect this case and print a pretty message with the fix
  2. We fall back to building LLVM with a warning when donwload-ci-llvm = "if-available" and use 1. when download-ci-llvm = true (my choice)
  3. We keep the status quo
  4. Other possibilities?

@albertlarsan68 albertlarsan68 self-assigned this Jan 31, 2023
@jyn514
Copy link
Member

jyn514 commented Jan 31, 2023

The current message is quite confusing, especially because it says "spurious failure", when it is not spurious at all.

Note that this has changed since the issue was opened:

downloading https://ci-artifacts.rust-lang.org/rustc-builds/c35035cefc709abddabfb28ecc6a326458d46ce2/rust-dev-nightly-x86_64-apple-darwin.tar.xz
curl: (22) The requested URL returned error: 404                                                                                                                                                          

error: failed to download llvm from ci

    help: old builds get deleted after a certain time
    help: if trying to compile an old commit of rustc, disable `download-ci-llvm` in config.toml:

    [llvm]
    download-ci-llvm = false

Given that I don't think this issue is super high priority. That said, I still have roughly the same opinion as in #107225 (comment):

The build should not fail if CI LLVM is not found, it should be built from source instead (is this the real bug?)

👍 this seems useful as long as the error is a 404, but we shouldn't build from source if static.rust-lang.org is having trouble (people should have to explicitly opt-in).

I do have some concerns that this will be hard to do correctly (e.g. large parts of src/bootstrap are loading this directly from config.toml and we need to make sure they're kept in sync) and also that it will "silently" regress compile times because people won't realize something has gone wrong.

I think until we find a bug that we can't solve by not trying to download the commits in the first place, we should continue solving the problem that way, both because it avoids an unnecessary network call and because it seems simpler than doing the logic dynamically.

@onur-ozkan
Copy link
Member

  1. We fall back to building LLVM with a warning when donwload-ci-llvm = "if-available" and use 1. when download-ci-llvm = true (my choice)

This seems good idea but I think we should do this only on certain errors. For example, if the problem is host-side(maybe user had temporary network problem on the bootstraping process), we can print the error and right after that let the user make this decision (start building LLVM from source or kill the process) via command prompt.

@jyn514
Copy link
Member

jyn514 commented Jan 31, 2023

tbh I feel like the current error message already gives enough info to fix the problem and any additional work is overkill.

@jyn514
Copy link
Member

jyn514 commented Feb 3, 2023

@Nilstrieb gave a 👍 so I'm going to assume that means this is solved.

@jyn514 jyn514 closed this as completed Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

4 participants