Skip to content

Use runners from namespace#19604

Closed
zanieb wants to merge 25 commits into
mainfrom
zb/use-namespace-runners
Closed

Use runners from namespace#19604
zanieb wants to merge 25 commits into
mainfrom
zb/use-namespace-runners

Conversation

@zanieb

@zanieb zanieb commented May 29, 2026

Copy link
Copy Markdown
Member

No description provided.

Comment thread .github/workflows/test-integration.yml Outdated
integration-test-windows-python-install-manager:
name: "windows python install manager"
timeout-minutes: 10
# The Store package is not compatible with the Namespace Windows Server 2022 image.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Suggested change
# The Store package is not compatible with the Namespace Windows Server 2022 image.
# Note we cannot use Namespace's Windows runner here because ...

Comment on lines -79 to -85
- name: "Create minix filesystem (low hardlink limit)"
run: |
truncate -s 16M /tmp/minix.img
mkfs.minix /tmp/minix.img
sudo mkdir /minix
sudo mount -o loop /tmp/minix.img /minix
sudo chown "$(id -u):$(id -g)" /minix

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We need to figure this out before merging

hdiutil attach /tmp/noreflink.dmg
echo "HFS_MOUNT=/Volumes/NoReflink" >> "$GITHUB_ENV"

- name: "Create CI keychain"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Let's add a comment here explaining that we're creating an unlocked keychain

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

which is not needed on GitHub or Depot runners, but is on Namespace

Comment on lines +873 to +875
# run-on-arch installs binfmt handlers on local Docker, so bypass the Namespace Remote Builder for its tests.
- name: "Use local Docker builder for emulated tests"
run: docker buildx use default

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Is this the best way to bypass this?

Comment on lines +435 to +453
# Install the 32-bit cross target on 64-bit (noop if we're already on 64-bit)
rustup target add ${{ matrix.target }}
# If we're running on rhel centos, install needed packages.
if command -v yum &> /dev/null; then
yum update -y && yum install -y pkgconfig libatomic

# Install cross build requirements
if [[ "${{ matrix.target }}" == "i686-unknown-linux-gnu" ]]; then
yum install -y glibc-devel.i686 libstdc++-devel.i686 libatomic.i686
fi

# Symlink libatomic so the linker can find it with -latomic.
if [[ -f "/usr/lib/libatomic.so.1" && ! -f "/usr/lib/libatomic.so" ]]; then
ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
fi
else
# If we're running on debian-based system.
apt update -y && apt-get install -y pkg-config
fi

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Let's put this in scripts/ instead?

Comment on lines +429 to +430
# Match the uv wheel build above: i686 must cross-compile in a 64-bit container.
container: quay.io/pypa/manylinux2014

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Why did we not need this before?

zanieb added a commit that referenced this pull request May 29, 2026
As a part of #19604 I noticed that we were only testing WSL2 which is
not usable on Windows 2022 which is still fairly common.
@zanieb zanieb force-pushed the zb/use-namespace-runners branch from 37169c7 to 7890577 Compare May 29, 2026 20:45
zanieb added 19 commits May 29, 2026 16:08
The Linux cargo-test job failed before tests started when mounting the btrfs loop image: mount reported 'No such file or directory'. The Namespace runner executes inside a restricted container by default, which does not expose the mount capabilities required by the filesystem test setup.

Request a privileged Namespace container for this job so its existing btrfs, tmpfs, and minix mount coverage can continue to run on Namespace.
The Namespace macOS cargo-test job reached the test suite but every native keyring write failed with Security.framework error -25308: 'User interaction is not allowed.' The non-interactive runner session does not start with an unlocked default user keychain.

Create and unlock an ephemeral CI keychain, add it to the user search list, and make it the user-domain default before running the native-auth tests.
The Namespace Windows runner reached winget but the Microsoft Store package failed with 0x803fb104: 'The package is not compatible with the current Windows version or platform.' The expected WindowsApps py.exe shim was therefore never installed.

Keep this Store-specific compatibility test on windows-latest while the rest of the Windows integration matrix continues to use Namespace.
The Namespace Windows runner executes jobs as LocalSystem. Vampire/setup-wsl reached wsl.exe, but WSL refused to install the distribution with WSL_E_LOCAL_SYSTEM_NOT_SUPPORTED because WSL cannot run as LocalSystem.

Keep this WSL-specific test on windows-latest while the remaining Windows jobs continue to use Namespace runners.
The Namespace Remote Builder does not share the runner-local binfmt registrations installed by uraimo/run-on-arch-action. The armv6 smoke test therefore failed with an exec format error, while the s390x smoke test failed inside remote QEMU during package installation.

Select Docker's default local builder before the emulated wheel tests. This keeps release jobs on Namespace and retains Remote Builder caching for the preceding wheel builds while allowing the smoke-test action to use its local binfmt handlers.
The i686 uv-build wheel step let maturin select quay.io/pypa/manylinux2014_i686, but Namespace Docker rejected that image because it does not provide the requested linux/amd64 platform. The preceding uv wheel step already avoids this by cross-compiling i686 from the amd64 manylinux2014 image.

Mirror the working container, target installation, cross dependencies, and compiler configuration in the uv-build wheel step.
The privileged Namespace runner can create loop devices, but its host kernel does not currently expose btrfs: mounting the image fails with 'unknown filesystem type btrfs'.

Use an XFS loop filesystem formatted with reflink support instead. This keeps the Linux copy-on-write coverage enabled while allowing the cargo-test job to remain on Namespace.
The migrated Linux and macOS runner profiles now attach Namespace cache volumes with Git mirrors enabled. Standard checkout still clones from the remote for each job and cannot take advantage of those mirrors.

Use Namespace's optimized checkout action on cache-enabled Namespace profiles. Keep standard checkout on GitHub-hosted, CodSpeed, mixed Windows, and uncached Namespace Windows jobs.
The migrated Linux and macOS profiles now attach Namespace cache volumes protected so only main can persist updates. Continuing to use Swatinem/rust-cache would retain the remote archive upload and download phases that the mounted volumes avoid.

Use Namespace's Rust cache action on the five cache-enabled Linux and macOS jobs. Keep the existing cache action on Namespace Windows because cache volumes are not currently available there.
After the XFS reflink filesystem and tmpfs mount succeed, the Namespace host kernel rejects the low-hardlink minix image with 'unknown filesystem type minix'.

Leave UV_INTERNAL__TEST_LOWLINKS_FS unset on Linux so the targeted hardlink-limit integration test skips while the rest of the Linux suite continues to run on Namespace. Windows keeps the NTFS low-hardlink coverage.
The Namespace Linux runner does not provide the implicit D-Bus session that the GitHub-hosted runner exposed. Starting gnome-keyring-daemon alone leaves the native-auth and uv-keyring tests failing with 'no secret service provider or dbus session found'.

Start an explicit session bus before gnome-keyring and persist its address through GITHUB_ENV so the cargo test step can connect to the Secret Service provider.
The Namespace Windows runner previously started jobs as LocalSystem, causing the WSL integration test to fail with WSL_E_LOCAL_SYSTEM_NOT_SUPPORTED. Namespace has rolled out a fix for how Windows sessions are started and expects it to resolve that failure.\n\nMove the WSL integration job back to the Namespace Windows profile so CI validates the updated session behavior.
Namespace's Windows session rollout resolves the previous WSL_E_LOCAL_SYSTEM_NOT_SUPPORTED failure, but the runner still cannot create a WSL2 VM: setup-wsl fails with HCS_E_HYPERV_NOT_INSTALLED because the profile does not expose the required virtualization support.\n\nThe pyenv-win integration test exercises shim discovery from a Linux shell and does not depend on WSL2 behavior. Configure setup-wsl to use its supported WSL1 mode so the test can remain on Namespace Windows.
The walltime benchmark uploads a roughly 667 MB tar archive before handing it to the Codspeed runner. On Namespace, the GitHub artifact upload step took about 85 seconds.

Disable zip compression for this upload so the next CI run can measure whether avoiding compression reduces the handoff overhead.
The Namespace Ampere ARM runner restored the walltime benchmark cache successfully but took roughly twice as long as Depot to compile the same crate set.

Use the Apple M4 Pro-backed Linux ARM64 profile for this build so CI can compare the same 4 vCPU, 16 GB workload on the faster host class.
@zanieb zanieb force-pushed the zb/use-namespace-runners branch from 8844084 to 950590a Compare May 29, 2026 21:16
Namespace Windows runners can run the pyenv integration test with WSL1, but their profile still does not expose the virtualization support needed to create a WSL2 VM. The upstream workflow now exercises both WSL versions.\n\nKeep the WSL1 case on Namespace and retain the WSL2 case on GitHub-hosted Windows 2025 so the runner migration does not drop WSL2 coverage.
The Namespace cache action otherwise prefers a runner-provided spacectl binary and falls back to resolving the latest release. That makes the executable used by trusted CI mutable independently of the pinned action revision.\n\nPin spacectl 0.10.0 at each Namespace cache-action invocation so trusted builds use a reproducible CLI release.
zanieb added 4 commits June 1, 2026 10:31
The Namespace host kernel does not expose Minix, so the EMLINK recovery integration test skipped on Linux after the runner migration. Use an ext4 loop image instead; the test already exhausts ext4's approximately 65,000-link limit.
Document why the Store-backed Python Install Manager test remains on GitHub Windows and why Namespace macOS tests create an unlocked ephemeral keychain.
Namespace's Docker path requires linux/amd64 images, so the uv-build i686 wheel now mirrors the existing cross-compiled uv wheel. Move the shared container bootstrap into a script to keep the two release builds aligned.
run-on-arch installs binfmt handlers on runner-local Docker, while Namespace Remote Builders do not share them. Link Namespace's documented per-build opt-out next to each docker buildx use default step.
@astral-sh-bot

astral-sh-bot Bot commented Jun 8, 2026

Copy link
Copy Markdown

uv test inventory changes

This PR changes the tests when compared with the latest main baseline.

  • Added tests: 1
  • Removed tests: 102
  • Changed suites: 10
uv: +0 / -5

Added: none

Removed:

  • uv::commands::project::upgrade::tests::relax_requirement_converts_compatible_release_to_lower_bound
  • uv::commands::project::upgrade::tests::relax_requirement_preserves_lower_bounds_and_exclusions
  • uv::commands::project::upgrade::tests::relax_requirement_preserves_requirement_metadata
  • uv::commands::project::upgrade::tests::relax_requirement_removes_blocking_only_constraints
  • uv::settings::tests::upgrade_settings_target_only_requested_package
uv-cache: +0 / -3

Added: none

Removed:

  • uv-cache::tests::prune_ci_does_not_follow_wheel_symlinks
  • uv-cache::tests::prune_does_not_follow_archive_symlinks
  • uv-cache::tests::prune_does_not_follow_environment_symlinks
uv-cache-info: +0 / -1

Added: none

Removed:

  • uv-cache-info::git_info::tests::commit_and_tags_from_linked_worktree
uv-client: +0 / -4

Added: none

Removed:

  • uv-client::registry_client::tests::no_index_disables_explicit_flat_index
  • uv-client::registry_client::tests::no_index_disables_explicit_simple_index
  • uv-client::registry_client::tests::no_index_disables_torch_simple_index
  • uv-client::registry_client::tests::simple_detail_does_not_fetch_legacy_find_links
uv-dev: +0 / -8

Added: none

Removed:

  • uv-dev::generate_scenarios::tests::accepted_snapshots_do_not_make_generated_file_stale
  • uv-dev::generate_scenarios::tests::compile_requirements_preserve_multiple_root_entries
  • uv-dev::generate_scenarios::tests::missing_scenarios_directory_is_an_error
  • uv-dev::generate_scenarios::tests::scenario_suites_require_pypi_feature
  • uv-dev::generate_scenarios::tests::snapshot_like_documentation_changes_make_generated_file_stale
  • uv-dev::generate_scenarios::tests::stale_generated_file_is_an_error
  • uv-dev::generate_scenarios::tests::vendored_scenarios_parse
  • uv-dev::tests::scenario_tests_command_uses_explicit_name
uv-platform-tags: +0 / -4

Added: none

Removed:

  • uv-platform-tags::platform::tests::platform_pretty_pyemscripten
  • uv-platform-tags::platform_tag::tests::pyemscripten_platform
  • uv-platform-tags::tags::tests::test_platform_tags_pyemscripten
  • uv-platform-tags::tags::tests::test_platform_tags_pyodide
uv-resolver: +0 / -8

Added: none

Removed:

  • uv-resolver::error::tests::collapse_local_versions_drops_source_tree_without_recursion
  • uv-resolver::error::tests::collapse_proxies_drops_source_tree_without_recursion
  • uv-resolver::error::tests::derivation_tree_packages_are_unique
  • uv-resolver::error::tests::drops_transformed_derivation_tree_without_recursion
  • uv-resolver::error::tests::formats_debug_derivation_tree_without_recursion
  • uv-resolver::error::tests::iterative_debug_matches_pubgrub_debug
  • uv-resolver::pubgrub::report::tests::formats_deep_derivation_tree_without_recursion
  • uv-resolver::pubgrub::report::tests::iterative_reporter_matches_pubgrub_for_shared_nodes
uv-test: +0 / -16

Added: none

Removed:

  • uv-test::find_links::tests::vendor_server_construction_does_not_load_artifacts
  • uv-test::packse::scenario::tests::parse_basic_scenario
  • uv-test::packse::scenario::tests::parse_extras_scenario
  • uv-test::packse::scenario::tests::path_is_included_in_parse_errors
  • uv-test::packse::scenario::tests::reject_invalid_requires_python
  • uv-test::packse::scenario::tests::reject_invalid_wheel_tag
  • uv-test::packse::scenario::tests::reject_unknown_metadata_field
  • uv-test::packse::server::tests::extract_package_name_accepts_with_or_without_trailing_slash
  • uv-test::packse::server::tests::extract_package_name_rejects_invalid_paths
  • uv-test::packse::server::tests::server_index_construction_does_not_load_vendor_artifacts
  • uv-test::packse::wheel::tests::extra_deps_with_markers_include_the_extra_marker
  • uv-test::packse::wheel::tests::extra_deps_with_or_markers_preserve_precedence
  • uv-test::packse::wheel::tests::generate_simple_sdist
  • uv-test::packse::wheel::tests::generate_simple_wheel
  • uv-test::vendor::tests::artifact_lock_path_is_per_artifact
  • uv-test::vendor::tests::cached_bytes_are_held_per_artifact
uv-workspace: +0 / -3

Added: none

Removed:

  • uv-workspace::pyproject_mut::test::replace_dependency_preserves_source
  • uv-workspace::workspace::tests::workspace_cache_does_not_store_partial_discovery
  • uv-workspace::workspace::tests::workspace_cache_reuses_workspace_for_member
uv::it: +1 / -50

Added:

  • uv::it::pip_install::invalidate_path_on_commit

Removed:

  • uv::it::cache_clean::clean_package_does_not_follow_symlinks
  • uv::it::check::check_isolated
  • uv::it::check::check_isolated_no_project
  • uv::it::check::check_rejects_tool_arguments
  • uv::it::check::check_ty_version_no_match
  • uv::it::check::check_ty_version_pinned_verbose
  • uv::it::export::requirements_txt_emit_indexes
  • uv::it::pip_compile::compile_constraints_many_versions
  • uv::it::pip_compile::exclude_direct_dependency_from_uv_toml
  • uv::it::pip_install::find_links_multiple
  • uv::it::pip_install::invalidate_path_on_worktree_packed_commit
  • uv::it::pip_list::list_outdated_find_links
  • uv::it::pip_uninstall::uninstall_egg_info_top_level_drive_relative
  • uv::it::python_install::python_install_multiple_unmanaged_executables
  • uv::it::show_settings::lock_baseline
  • uv::it::show_settings::pip_compile_baseline
  • uv::it::show_settings::pip_install_baseline
  • uv::it::show_settings::tool_install_baseline
  • uv::it::show_settings::version_baseline
  • uv::it::sync::no_install_env_var_conflicts
  • uv::it::sync::sync_reuses_pip_install_sdist_cache
  • uv::it::sync::sync_reuses_pip_install_wheel_cache
  • uv::it::tool_install::tool_install_editable_rebuilds_explicit_local_directory
  • uv::it::tool_install::tool_install_explicit_local_directory_respects_global_python_change
  • uv::it::tool_install::tool_install_rebuilds_explicit_local_with_requirement
  • uv::it::tool_uninstall::tool_uninstall_multiple_names_with_missing_receipt
  • uv::it::upgrade::upgrade_allows_registry_source
  • uv::it::upgrade::upgrade_help
  • uv::it::upgrade::upgrade_ignores_inapplicable_non_registry_source
  • uv::it::upgrade::upgrade_rejects_direct_url_requirement
  • uv::it::upgrade::upgrade_rejects_duplicate_production_dependencies
  • uv::it::upgrade::upgrade_rejects_dynamic_project_version
  • uv::it::upgrade::upgrade_rejects_multi_member_workspace
  • uv::it::upgrade::upgrade_rejects_non_registry_source_for_top_level_extra
  • uv::it::upgrade::upgrade_rejects_non_registry_sources
  • uv::it::upgrade::upgrade_rejects_self_dependency
  • uv::it::upgrade::upgrade_rejects_virtual_workspace_root
  • uv::it::upgrade::upgrade_rejects_workspace_root_non_registry_source
  • uv::it::upgrade::upgrade_reports_no_solution_without_mutation
  • uv::it::upgrade::upgrade_reports_no_version_change_without_mutation
  • uv::it::upgrade::upgrade_requires_current_project
  • uv::it::upgrade::upgrade_requires_production_dependency
  • uv::it::upgrade::upgrade_resolves_nested_workspace_member_without_mutation
  • uv::it::upgrade::upgrade_resolves_selected_dependency_without_mutation
  • uv::it::upgrade::upgrade_selects_normalized_production_dependency
  • uv::it::venv::create_venv_with_invalid_amd_gpu_architecture
  • uv::it::venv::create_venv_with_invalid_cuda_driver_version
  • uv::it::version::version_virtual_workspace_root_rejects_before_members
  • uv::it::workspace::transitive_dep_in_git_workspace_with_cache_inside_workspace
  • uv::it::workspace_dir::workspace_dir_cached_project_ignores_outer_workspace

@zaniebot

zaniebot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Values are medians across six main runs and three equivalent Namespace runs. Individual jobs use execution duration; required checks measures from plan start to gate completion. Windows cargo tests show the range across the three shard medians. Initial queue time is excluded. Lower is better; Δ = Namespace / main - 1.

Job main (n=6) Namespace (n=3) Δ
Windows cargo tests 7:31–9:02 4:00–4:56 −52% to −39%
Windows clippy 3:00 1:29 −50%
Linux cargo tests 4:37 5:17 +15%
macOS cargo tests 7:33 6:50 −9%
Simulated benchmark 6:14 8:13 +32%
Publish dry-run 5:40 6:26 +14%
Required checks 10:18 7:34 −26%

Windows jobs are substantially faster. macOS tests are modestly faster, while Linux tests, the simulated benchmark, and publish dry-run are slower.

The ARM walltime benchmark itself is unchanged. Disabling artifact compression reduced upload time but increased the artifact from 667 MB to 1.89 GB and download time from 32–38 seconds to 1:18–1:55, making the overall transfer slower.

One Namespace attempt waited 5:25 before plan, making its request-to-gate time 14:28.

Runs: main 1, 2, 3, 4, 5, 6; Namespace 1, 2, 3.

The release matrix was excluded because the sampled main runs did not exercise comparable release jobs.

zanieb added a commit that referenced this pull request Jun 9, 2026
Moves to equivalent Namspace runners for Windows instead of GitHub,
which show the greatest performance improvement (picked out from
#19604). These runners do not support persistent cache volumes in
namespace and, unlike Depot, they do not hijack the `action/cache` API
so we're still just using GitHub's caching model here alleviating any
concerns about cache poisoning.

Co-authored-by: Zanie Blue <contact@zanie.dev>
@zanieb zanieb closed this Jun 10, 2026
@zanieb

zanieb commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

#19751 instead for now

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