Repository navigation
cli: add dx fetch and --offline for build and test (closes #13197) - #13285
Merged
Merged
Conversation
dx fetch runs bazel fetch (bazel vendor with --vendor[=DIR], default vendor_src) over dx scopes, with the build mode and shared settings dx build uses, then places the pinned prebuilt dx into DX_CACHE_DIR when the running binary matches the .dx/pins sha256. dx build/test --offline pass --repository_disable_download to Bazel and the scope queries. The release consumer test runs dx fetch, then dx test --offline with every download blocked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K
…ch page in the user book Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K
… dx build Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K
TrapsterDK
force-pushed
the
issue-13197-dx-fetch
branch
from
November 18, 2026 01:16
62946e9 to
a889e2c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Users need a way to download everything a build needs while online, then build and test with no network.
What
dx fetch [--vendor[=DIR]] [--here] [--affected [--since <ref>|--base <ref>]] [--debug|--release] [scope ...] [-- bazel-options ...]runsbazel fetch(orbazel vendorwith--vendor, defaultvendor_src) over dx scopes with the same.bazelrc, cache settings and build mode asdx build. Likedx build,--affectedwith scopes keeps only the affected targets inside them.dx fetchplaces the pinned prebuilt dx into$DX_CACHE_DIR/bin/<version>/when the running binary matches the.dx/pinssha256 (cli/cli/src/exec/dx_asset.rs), and reports adx_cachedordx_not_cachednotice.dx build --offlineanddx test --offlinepass--repository_disable_downloadto Bazel and to the scope queries.dx fetch //..., thendx test --offline //...with every download blocked through a--downloader_configofblock *.docs/cli/commands/fetch.md(in the user book and route test), and--offlineinbuild-test-coverage.md.Tests
bazel test //cli/plan:dx_plan_test //cli/process:dx_process_test //cli/cli:dx_cli_test //tools/ci:command_docs_test //tools/docs/site:rendered_site_test //tools/docs/site:site_unit: all pass.//tools/api:api_test:api/cli.jsonis regenerated (it also picks up dx --affected: intersect with scopes, clear no-git error, --base and [affected] base #13277's--base). The test still fails on main'sdx.schema.json changed but its version is still 1; bump the schema version first, which comes from dx --affected: intersect with scopes, clear no-git error, --base and [affected] base #13277, not this PR.tools/dx check --apply --affected: generate, format, typecheck pass. Lint warnings are only in files this PR doesn't touch.//tools/ci:prose_rules_testfails on main already (docs/design/layout.md: 1304 words). This PR doesn't touch that file.//deploy/private/release/tests:release_consumer_smoke_testruns through evidence.yml on linux_x86_64, macos_arm64 and windows_x86_64.Closes #13197
🤖 Generated with Claude Code
https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K