rust icon indicating copy to clipboard operation
rust copied to clipboard

Give a better error message when CI download fails

Open Teapot4195 opened this issue 1 year ago • 7 comments

Fixes an issue introduced in 7b5577985df7. Looks like a typo, checked the output from diff and doesn't look like there are any other issues in with the commit.

resolves 118758

Teapot4195 avatar Jan 18 '24 15:01 Teapot4195

r? @Mark-Simulacrum

(rustbot has picked a reviewer for you, use r? to override)

rustbot avatar Jan 18 '24 15:01 rustbot

Not exactly as suggested in the original issue, however based on this zulip discussion it seems like putting it under download_http_with_retries is a better choice.

Teapot4195 avatar Jan 18 '24 21:01 Teapot4195

The job mingw-check-tidy failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v4' (SHA:b4ffde65f46336ab88eb53be808477a3936bae11)
Download action repository 'actions/upload-artifact@v3' (SHA:a8a3f3ad30e3422c9c7b888a15615d19a852ae32)
Complete job name: PR - mingw-check-tidy
git config --global core.autocrlf false
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
---
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=Teapot4195
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_e27f84aa-a253-4d4e-a1c2-06c5a45d4ec5
GITHUB_EVENT_NAME=pull_request
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=6e4fa5676e61b2f6ff239eb5ade5ad7440ba7ae6
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_e27f84aa-a253-4d4e-a1c2-06c5a45d4ec5
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_e27f84aa-a253-4d4e-a1c2-06c5a45d4ec5
GITHUB_TRIGGERING_ACTOR=Teapot4195
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/120098/merge
GITHUB_WORKFLOW_SHA=6e4fa5676e61b2f6ff239eb5ade5ad7440ba7ae6
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_19_X64=/opt/hostedtoolcache/go/1.19.13/x64
---
Removing intermediate container b4c39f428715
 ---> 0efbce068f77
Step 6/10 : COPY host-x86_64/mingw-check/reuse-requirements.txt /tmp/
 ---> 2086e1bc88e3
Step 7/10 : RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt     && pip3 install virtualenv
Collecting binaryornot==0.4.4
  Downloading binaryornot-0.4.4-py2.py3-none-any.whl (9.0 kB)
Collecting boolean-py==4.0
  Downloading boolean.py-4.0-py3-none-any.whl (25 kB)
---
Building wheels for collected packages: reuse
  Building wheel for reuse (pyproject.toml): started
  Building wheel for reuse (pyproject.toml): finished with status 'done'
  Created wheel for reuse: filename=reuse-1.1.0-cp310-cp310-manylinux_2_35_x86_64.whl size=180123 sha256=f323ccf11d14c5b11f6d5e70edb46e391f4b49a5df5c7d922224477ad8ee15c5
  Stored in directory: /tmp/pip-ephem-wheel-cache-31ty98ml/wheels/c2/3c/b9/1120c2ab4bd82694f7e6f0537dc5b9a085c13e2c69a8d0c76d
Installing collected packages: boolean-py, binaryornot, setuptools, reuse, python-debian, markupsafe, license-expression, jinja2, chardet
  Attempting uninstall: setuptools
    Found existing installation: setuptools 59.6.0
    Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr
    Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr
    Can't uninstall 'setuptools'. No files were found to uninstall.
Successfully installed binaryornot-0.4.4 boolean-py-4.0 chardet-5.1.0 jinja2-3.1.2 license-expression-30.0.0 markupsafe-2.1.1 python-debian-0.1.49 reuse-1.1.0 setuptools-66.0.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Collecting virtualenv
  Downloading virtualenv-20.25.0-py3-none-any.whl (3.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.8/3.8 MB 44.7 MB/s eta 0:00:00
Collecting platformdirs<5,>=3.9.1
  Downloading platformdirs-4.1.0-py3-none-any.whl (17 kB)
Collecting filelock<4,>=3.12.2
  Downloading filelock-3.13.1-py3-none-any.whl (11 kB)
Collecting distlib<1,>=0.3.7
  Downloading distlib-0.3.8-py2.py3-none-any.whl (468 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.9/468.9 KB 112.0 MB/s eta 0:00:00
Installing collected packages: distlib, platformdirs, filelock, virtualenv
Successfully installed distlib-0.3.8 filelock-3.13.1 platformdirs-4.1.0 virtualenv-20.25.0
Removing intermediate container a5d07f3d0ce4
 ---> 62a3decf7c84
Step 8/10 : COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
 ---> 779f93a634af
 ---> 779f93a634af
Step 9/10 : COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
 ---> 33bb2257716e
Step 10/10 : ENV SCRIPT TIDY_PRINT_DIFF=1 python2.7 ../x.py test            --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint
Removing intermediate container ef09d717b5e0
 ---> 435e4ecc85f4
Successfully built 435e4ecc85f4
Successfully tagged rust-ci:latest
Successfully tagged rust-ci:latest
##[endgroup]
Built container sha256:435e4ecc85f43d59ab3ce7c00ea7be984d5c639cac6182908f84077077e0ddcd
Uploading finished image sha256:435e4ecc85f43d59ab3ce7c00ea7be984d5c639cac6182908f84077077e0ddcd to https://ci-caches.rust-lang.org/docker/139141a603ff222e98d20ef66f0e4eaedfc4b373e41d302ecff577f90ee0c6cf0cab092d18a8f6a073c88b362b9a680d3b2b6e5c828faaf25d1b853eabb78b1a
IMAGE          CREATED          CREATED BY                                      SIZE      COMMENT
435e4ecc85f4   1 second ago     /bin/sh -c #(nop)  ENV SCRIPT=TIDY_PRINT_DIF…   0B        
779f93a634af   2 seconds ago    /bin/sh -c #(nop) COPY file:078ea1d11e7b7cda…   367B      
62a3decf7c84   3 seconds ago    |1 DEBIAN_FRONTEND=noninteractive /bin/sh -c…   23.9MB    
2086e1bc88e3   9 seconds ago    /bin/sh -c #(nop) COPY file:ac591dd6bc5afa66…   5.33kB    
0efbce068f77   11 seconds ago   |1 DEBIAN_FRONTEND=noninteractive /bin/sh -c…   23.1MB    
---
<missing>      7 days ago       /bin/sh -c #(nop)  LABEL org.opencontainers.…   0B        
<missing>      7 days ago       /bin/sh -c #(nop)  ARG LAUNCHPAD_BUILD_ARCH     0B        
<missing>      7 days ago       /bin/sh -c #(nop)  ARG RELEASE                  0B        

<botocore.awsrequest.AWSRequest object at 0x7f6cbaaa34d0>
gzip: stdout: Broken pipe
xargs: docker: terminated by signal 13
https://ci-caches.rust-lang.org/docker/139141a603ff222e98d20ef66f0e4eaedfc4b373e41d302ecff577f90ee0c6cf0cab092d18a8f6a073c88b362b9a680d3b2b6e5c828faaf25d1b853eabb78b1a
sha256:435e4ecc85f43d59ab3ce7c00ea7be984d5c639cac6182908f84077077e0ddcd
---
DirectMap4k:      178112 kB
DirectMap2M:     6113280 kB
DirectMap1G:    12582912 kB
##[endgroup]
Executing TIDY_PRINT_DIFF=1 python2.7 ../x.py test            --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint
+ TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint
    Finished dev [unoptimized] target(s) in 0.03s
##[endgroup]
downloading https://ci-artifacts.rust-lang.org/rustc-builds-alt/8424f8e8cdf07010967a57584fd647b30e930d4d/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz
extracting /checkout/obj/build/cache/llvm-8424f8e8cdf07010967a57584fd647b30e930d4d-true/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm
---
   Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
    Finished release [optimized] target(s) in 25.89s
##[endgroup]
fmt check
##[error]Diff in /checkout/src/bootstrap/src/core/download.rs at line 287:
             .into_iter()
             .map(|c| c as char)
             .collect();
+
+
         for s in log.split("\n") {
             if s.contains("Author:") {
                 if !s.contains(&format!("Author: {}", user.replace("\n", ""))) {
Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/rustfmt/bin/rustfmt" "--config-path" "/checkout" "--edition" "2021" "--unstable-features" "--skip-children" "--check" "/checkout/src/bootstrap/src/core/build_steps/format.rs" "/checkout/src/bootstrap/src/core/download.rs" "/checkout/src/bootstrap/src/core/sanity.rs" "/checkout/src/bootstrap/src/core/metadata.rs" "/checkout/src/librustdoc/config.rs" "/checkout/src/librustdoc/fold.rs" "/checkout/src/librustdoc/visit_ast.rs" "/checkout/src/bootstrap/src/core/build_steps/test.rs"` failed.
If you're running `tidy`, try again with `--bless`. Or, if you just want to format code, run `./x.py fmt` instead.
  local time: Thu Jan 18 21:06:59 UTC 2024
  network time: Thu, 18 Jan 2024 21:06:59 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

rust-log-analyzer avatar Jan 18 '24 21:01 rust-log-analyzer

fixed, did some thinking and it doesn't really make sense to check for commits not by the current user in origin/master..HEAD any more, nor does it make sense to be checking if the user's repo is out of date, checking if HEAD is out of date makes much more sense (especially since this is trying to explain why the download of a component failed).

Teapot4195 avatar Jan 20 '24 22:01 Teapot4195

@rustbot ready

Teapot4195 avatar Jan 28 '24 16:01 Teapot4195

@rustbot ready

Teapot4195 avatar Feb 05 '24 03:02 Teapot4195

:umbrella: The latest upstream changes (presumably #122389) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Mar 12 '24 19:03 bors

Needed to take a break, but hopefully I understood the changes you wanted to be done.

Teapot4195 avatar Apr 22 '24 14:04 Teapot4195

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> src/core/download.rs:698:83
    |
698 |         self.download_file(&format!("{base_url}/{url}"), &tarball, help_on_error, &commit);
    |                                                                                   ^^^^^^^ help: change this to: `commit`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
    = note: `-D clippy::needless-borrow` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::needless_borrow)]`

rust-log-analyzer avatar Apr 22 '24 14:04 rust-log-analyzer

:umbrella: The latest upstream changes (presumably #124883) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar May 12 '24 08:05 bors

@Teapot4195 this is still waiting on the review suggestions, if you can update those or mark them as resolved we can move this forward

Dylan-DPC avatar Aug 06 '24 13:08 Dylan-DPC