Skip to content

fix(pm): skip npm binary mirror lookup#2850

Closed
killagu wants to merge 1 commit into
nextfrom
agent/egg-dev/f45d2706
Closed

fix(pm): skip npm binary mirror lookup#2850
killagu wants to merge 1 commit into
nextfrom
agent/egg-dev/f45d2706

Conversation

@killagu
Copy link
Copy Markdown
Contributor

@killagu killagu commented Apr 27, 2026

Summary

  • Skip install-time binary mirror config loading when the selected registry is the official npm registry.
  • Reuse the same npm-registry predicate already used for binary mirror envs.
  • Add a focused test covering npm and npmmirror registry behavior.

Validation

  • cargo fmt -p utoo-pm
  • cargo test -p utoo-pm service::binary::tests::test_should_skip_binary_mirror_for_npm_registry
  • cargo build -p utoo-pm --profile release-local
  • cargo clippy -p utoo-pm --all-targets -- -D warnings --no-deps
  • cargo test -p utoo-pm
  • PATH=/home/killa/multica_workspaces/56c053c2-a029-45bb-a3f8-c83499005c8a/f45d2706/workdir/utoo/target/release-local:$PATH BENCH_RUNS=1 PM_LIST=utoo BENCH_DIR=/tmp/pm-bench-eggd RESULTS_DIR=/tmp/pm-bench-results-eggd UTOO_CACHE=/tmp/utoo-bench-cache-eggd bash bench/pm-bench-phases.sh

Benchmark summary, PM_LIST=utoo, single run:

  • p0_full_cold: 11.22s
  • p1_resolve: 5.49s
  • p3_cold_install: 9.87s
  • p4_warm_link: 1.09s

Note: full workspace cargo clippy --all-targets -- -D warnings --no-deps is blocked in this runner by missing system pkg-config/OpenSSL for unrelated workspace dependencies; package-scoped PM clippy passed.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces an early return in the update_package_binary function to skip binary mirror updates when applicable. It refactors the skip logic into a new helper function, should_skip_binary_mirror_for_registry, updates the associated debug logging, and adds unit tests to verify the registry-based skip logic. I have no feedback to provide.

@elrrrrrrr
Copy link
Copy Markdown
Contributor

Closing as stale: this draft is a one-off agent experiment from 2026-04-27 with no follow-up, and overlaps with sibling PRs exploring the same optimization. Reopen if revisited.

@elrrrrrrr elrrrrrrr closed this May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants