Skip to content

npm GETs in CI can be flaky, can we cache them? #142433

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
workingjubilee opened this issue Jun 12, 2025 · 7 comments · Fixed by #142434
Closed

npm GETs in CI can be flaky, can we cache them? #142433

workingjubilee opened this issue Jun 12, 2025 · 7 comments · Fixed by #142434
Labels
A-CI Area: Our Github Actions CI A-rustdoc-js Area: Rustdoc's JS front-end A-spurious Area: Spurious failures in builds (spuriously == for no apparent reason) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Comments

@workingjubilee
Copy link
Member

idk if it's worth it but I thought I'd raise the subject.

see #142432

Executing TIDY_PRINT_DIFF=1 npm install eslint@$(head -n 1 /tmp/eslint.version) &&  python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py,cpp
+ head -n 1 /tmp/eslint.version
+ TIDY_PRINT_DIFF=1 npm install [email protected]
npm ERR! code E502
npm ERR! 502 Bad Gateway - GET https://registry.npmjs.org/@humanwhocodes%2fobject-schema

npm ERR! A complete log of this run can be found in: /home/user/.npm/_logs/2025-06-12T18_06_57_099Z-debug-0.log

cc @Kobzol @GuillaumeGomez

@workingjubilee workingjubilee added A-spurious Area: Spurious failures in builds (spuriously == for no apparent reason) C-bug Category: This is a bug. A-rustdoc-js Area: Rustdoc's JS front-end A-CI Area: Our Github Actions CI labels Jun 12, 2025
@rustbot rustbot added needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Jun 12, 2025
@Kobzol
Copy link
Contributor

Kobzol commented Jun 12, 2025

#142434 should fix this. It should indeed be preinstalled, if possible.

@workingjubilee
Copy link
Member Author

@Kobzol Unfortunately it seems we have more than that tidy job pinging npm, though I agree it is the priority to fix: #142422 (comment)

@workingjubilee
Copy link
Member Author

seems we also want to preinstall a browser-ui-test version?

+ head -n 1 /tmp/browser-ui-test.version
+ npm install [email protected] --unsafe-perm=true

@workingjubilee
Copy link
Member Author

huh...

COPY host-x86_64/x86_64-gnu-tools/browser-ui-test.version /tmp/
ENV RUST_CONFIGURE_ARGS \
--build=x86_64-unknown-linux-gnu \
--save-toolstates=/tmp/toolstate/toolstates.json \
--enable-new-symbol-mangling
ENV HOST_TARGET x86_64-unknown-linux-gnu
# FIXME(#133381): currently rustc alt builds do *not* have rustc debug
# assertions enabled! Therefore, we cannot force download CI rustc.
#ENV FORCE_CI_RUSTC 1
COPY scripts/shared.sh /scripts/
# For now, we need to use `--unsafe-perm=true` to go around an issue when npm tries
# to create a new folder. For reference:
# https://github.com/puppeteer/puppeteer/issues/375
#
# We also specify the version in case we need to update it to go around cache limitations.
#
# The `browser-ui-test.version` file is also used by bootstrap to emit warnings in case
# the local version of the package is different than the one used by the CI.
ENV SCRIPT /tmp/checktools.sh ../x.py && \
npm install browser-ui-test@$(head -n 1 /tmp/browser-ui-test.version) --unsafe-perm=true && \
python3 ../x.py check compiletest --set build.compiletest-use-stage0-libtest=true && \
python3 ../x.py test tests/rustdoc-gui --stage 2 --test-args "'--jobs 1'"

@Kobzol
Copy link
Contributor

Kobzol commented Jun 12, 2025

Yeah, but now we just have to wait until half the internet comes back again.

@workingjubilee
Copy link
Member Author

workingjubilee commented Jun 12, 2025

true, hard to cache anything if you can't get it in the first place.

@workingjubilee
Copy link
Member Author

current status of outage at https://status.cloud.google.com/

Multiple GCP products are experiencing Service issues

Active
Start Time: 12 Jun 2025, 10:51 PDT
Last update:

12 Jun 2025, 14:16 PDT
Impacted products: Apigee, Apigee Edge Private Cloud, Apigee Edge Public Cloud + 29 more

Impacted locations: africa-south1, asia, asia-east1 + 43 more

@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 13, 2025
@bors bors closed this as completed in fa359f6 Jun 14, 2025
rust-timer added a commit that referenced this issue Jun 14, 2025
Rollup merge of #142434 - Kobzol:preinstall-eslint, r=marcoieni

 Pre-install JS dependencies in tidy Dockerfile

Also fixes passing `TIDY_PRINT_DIFF` to tidy, which has been passed to `npm install` rather than to tidy after the latest change here.

r? `@GuillaumeGomez`

Fixes: #142433
@fmease fmease added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jun 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI Area: Our Github Actions CI A-rustdoc-js Area: Rustdoc's JS front-end A-spurious Area: Spurious failures in builds (spuriously == for no apparent reason) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants