From f3c00c186976703a7c49aef47cde8b0c9416e274 Mon Sep 17 00:00:00 2001 From: Kieron Lanning Date: Wed, 18 Nov 2026 14:44:01 +0000 Subject: [PATCH 1/6] build: move to Purview.BuildSdk 2.2.0 and the Supported framework set BuildSdk 2.2.0 makes runtime-async and the C# 15 updated memory-safety rules opt-in, so enable both explicitly for the net11.0 builds. Select the Supported target-framework set (net10.0;net11.0) repo-wide and derive the WSL backend's portable and Windows targets from it. Guard the memory-safety rules alongside runtime-async in BuildFeatureTests, and update the docs that described them as SDK defaults. Also bumps the purview.build and dotnet-inspect tools. --- .config/dotnet-tools.json | 4 +-- .editorconfig | 2 +- AGENTS.md | 22 +++++++------ docs/wiki/Architecture.md | 10 +++--- docs/wiki/Contributing.md | 7 +++-- global.json | 2 +- src/Directory.Build.props | 33 +++++++++++++++----- src/src/Directory.Build.props | 5 +-- src/src/Wsl/Wsl.csproj | 10 +++++- src/tests/Wsl.UnitTests/BuildFeatureTests.cs | 29 ++++++++++++++--- 10 files changed, 89 insertions(+), 35 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index bc9bc27..ec846e1 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -10,14 +10,14 @@ "rollForward": false }, "dotnet-inspect": { - "version": "0.27.0", + "version": "0.28.0", "commands": [ "dotnet-inspect" ], "rollForward": false }, "purview.build": { - "version": "0.9.0", + "version": "0.9.2", "commands": [ "purview-build" ], diff --git a/.editorconfig b/.editorconfig index a9b39cb..b0390ec 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,4 +1,4 @@ -# Purview.BuildSdk 2.0.0 - managed file, do not edit +# Purview.BuildSdk 2.2.0 - managed file, do not edit # # This file is written by Purview.BuildSdk and is replaced whenever the SDK version changes. The version # on the first line is how the SDK recognises a file it owns: a .editorconfig without that marker is diff --git a/AGENTS.md b/AGENTS.md index 2ee30fc..e90dfc5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -131,20 +131,22 @@ whenever a target framework, a backend package or the `buildTransitive` assets c dropped): `Purview.Containers.Core` (abstractions) and the service modules target **`net10.0` and `net11.0`** on any platform. `Purview.Containers.Wsl` is **multi-target**: `net10.0`/`net11.0` (portable facades) and `net10.0-windows10.0.19041.0`/`net11.0-windows10.0.19041.0` (the WSLC implementations). - Purview.BuildSdk's `Current` target-framework set supplies the `net10.0;net11.0` list to the library - subtree, while `src/Directory.Build.props` pins that set to `net11.0-windows10.0.19041.0` for - `src/tests` so the WSLC tests bind the implementation; `Wsl.csproj` adds the Windows - builds with a platform-identifier condition (never a literal TFM). The Docker integration projects + `src/Directory.Build.props` selects Purview.BuildSdk's `Supported` target-framework set + (`PurviewTargetFrameworkSet=Supported`, `net10.0;net11.0` in BuildSdk 2.2.0) for every project that + declares no target of its own, and pins that set to `net11.0-windows10.0.19041.0` for `src/tests` so + the WSLC tests bind the implementation. `Wsl.csproj` derives its four targets from the same set (each + supported framework plus its `-windows10.0.19041.0` build) and selects files with a + platform-identifier condition (never a literal TFM). The Docker integration projects declare `net10.0` directly so they run on Linux **and** keep the lowest supported framework under test. The contract, the failures that enforce it and the CI workarounds are documented in [Consumer Requirements](docs/wiki/Consumer-Requirements.md); update that page whenever a target framework, the `buildTransitive` defaults, the payload layout or the `PCC0001`/`PCC0002` guards change. -- The `net11.0` library builds are compiled with `runtime-async=on` (`PurviewRuntimeAsync=false` opts out): - Purview.BuildSdk applies it to every `net11.0`+ target together with the C# 15 - `updated-memory-safety-rules` tier (`MemorySafetyRules=2`), so the repository does not repeat either - switch. The runtime manages suspension instead of compiler-generated state machines, which lowers async - overhead and makes live stack traces name the real methods. `Wsl.UnitTests/BuildFeatureTests.cs` guards - it. The `net10.0` builds keep the classic state machines. Because `closed` hierarchies require +- The `net11.0` builds are compiled with `runtime-async=on` and the C# 15 + `updated-memory-safety-rules` tier. Purview.BuildSdk 2.2.0 makes both **opt-in**, so + `src/Directory.Build.props` sets `PurviewRuntimeAsync=true` and `MemorySafetyRules=2` explicitly; do not + remove them. The runtime manages suspension instead of compiler-generated state machines, which lowers + async overhead and makes live stack traces name the real methods. `Wsl.UnitTests/BuildFeatureTests.cs` + guards both. The `net10.0` builds keep the classic state machines. Because `closed` hierarchies require `System.Runtime.CompilerServices.IsClosedTypeAttribute` and C# unions require `UnionAttribute` (both .NET 11 runtime types), neither is used: no public hierarchy here is closed anyway — `WaitStrategy`, `ContainerException` and the backend interfaces are documented extension points. diff --git a/docs/wiki/Architecture.md b/docs/wiki/Architecture.md index 9d66cfb..8a4d034 100644 --- a/docs/wiki/Architecture.md +++ b/docs/wiki/Architecture.md @@ -53,16 +53,18 @@ Microsoft types (`Session`, `Container`, `Process`, `ContainerSettings`, …) ar ## Target frameworks Every package ships `net10.0` and `net11.0` assets. **.NET 8 and .NET 9 are dropped**; the contract is in -[Consumer Requirements](Consumer-Requirements.md). Purview.BuildSdk's `Current` target-framework set -supplies that pair; the repository does not hand-maintain it. +[Consumer Requirements](Consumer-Requirements.md). Purview.BuildSdk's `Supported` target-framework set +(selected in `src/Directory.Build.props`) supplies that pair; the repository does not hand-maintain it, +and the WSL backend derives its Windows builds from the same set. - `net10.0` is the floor. A consumer that has not moved to .NET 11 keeps the classic compiler-generated async state machines and the .NET 10 library surface. - `net11.0` is compiled with `runtime-async=on` and the C# 15 updated memory-safety rules (`MemorySafetyRules=2`). The runtime manages suspension and resumption instead of compiler-generated state machines, which lowers async overhead and makes live stack traces (profiler, `new StackTrace()`, - debugger) name the real methods. `PurviewRuntimeAsync=false` opts out for a local experiment; - `Wsl.UnitTests/BuildFeatureTests.cs` guards that the shipped default is on. + debugger) name the real methods. Purview.BuildSdk 2.2.0 makes both features opt-in, so + `src/Directory.Build.props` enables them (`PurviewRuntimeAsync=true`, `MemorySafetyRules=2`); + `Wsl.UnitTests/BuildFeatureTests.cs` guards that both are on in the shipped build. - The WSL Containers backend uses the same split for its Windows builds, and a single implementation payload serves both portable targets because a .NET 11 process loads a .NET 10 assembly. diff --git a/docs/wiki/Contributing.md b/docs/wiki/Contributing.md index b5160b2..a9a762a 100644 --- a/docs/wiki/Contributing.md +++ b/docs/wiki/Contributing.md @@ -7,9 +7,10 @@ request. - Windows with **WSL Containers** for integration tests; see [Getting Started](Getting-Started.md). - .NET SDK 11 (pinned in `global.json` as `11.0.100`). -- The library projects split by framework: Purview.BuildSdk's `Current` target-framework set gives the - backend-neutral abstractions and the service modules `net10.0;net11.0` (the `net11.0` build adds - `runtime-async=on` and the C# 15 updated memory-safety rules). +- The library projects split by framework: Purview.BuildSdk's `Supported` target-framework set + (selected in `src/Directory.Build.props`) gives the backend-neutral abstractions and the service + modules `net10.0;net11.0` (the `net11.0` build adds `runtime-async=on` and the C# 15 updated + memory-safety rules, both opted into explicitly in `src/Directory.Build.props`). `src/src/Wsl/Wsl.csproj` is multi-target (`net10.0`/`net11.0` facades plus `net10.0-windows10.0.19041.0`/`net11.0-windows10.0.19041.0` implementations) because the WSL Containers projection is Windows-only. `src/tests` pins the same set to diff --git a/global.json b/global.json index a12bdeb..4a0ba47 100644 --- a/global.json +++ b/global.json @@ -5,7 +5,7 @@ "allowPrerelease": false }, "msbuild-sdks": { - "Purview.BuildSdk": "2.0.0" + "Purview.BuildSdk": "2.2.0" }, "test": { "runner": "Microsoft.Testing.Platform" diff --git a/src/Directory.Build.props b/src/Directory.Build.props index f8d7df9..3a67fdc 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -3,17 +3,36 @@ Purview.Containers true + Supported <_PurviewIsTestSubtree Condition="$([System.String]::Copy('$(MSBuildProjectDirectory)').Replace('\', '/').Contains('/src/tests/'))" >true - net11.0-windows10.0.19041.0 + net11.0-windows10.0.19041.0 + + true + 2 x64 10.0.26100.80 true diff --git a/src/src/Directory.Build.props b/src/src/Directory.Build.props index 80c534b..84b0486 100644 --- a/src/src/Directory.Build.props +++ b/src/src/Directory.Build.props @@ -6,8 +6,9 @@ net10.0 and net11.0: .NET 10 is the lowest consumer that is still supported (.NET 8 and .NET 9 are deliberately dropped), and the net11.0 build lets a .NET 11 consumer bind the .NET 11 assembly instead (runtime-async compilation, .NET 11 library APIs and C# 15 features). That list - is Purview.BuildSdk's `Current` target-framework set - the default when a project declares no - target of its own - so this file must not restate it. Only the WSL Containers backend is + is Purview.BuildSdk's `Supported` target-framework set, selected in the parent + src/Directory.Build.props for every project that declares no target of its own, so this file + must not restate it. Only the WSL Containers backend is Windows-only, so it adds its own Windows target frameworks in its project file. The parent Directory.Build.props still owns the repo-wide identity (NamespacePrefix), the SDK diff --git a/src/src/Wsl/Wsl.csproj b/src/src/Wsl/Wsl.csproj index 39aefdc..866d048 100644 --- a/src/src/Wsl/Wsl.csproj +++ b/src/src/Wsl/Wsl.csproj @@ -19,9 +19,17 @@ platform-neutral consumer gets the facade. The approach rests on the extracted and tested result that the WSLC projection is a net8.0-windows asset loadable by a net10.0 or net11.0 process. + + The list is derived from Purview.BuildSdk's `Supported` set (selected in src/Directory.Build.props) + rather than restated: each supported framework contributes its portable build and its + -windows10.0.19041.0 build, so this package always targets exactly what the other packages do. + The payload target below and the pack manifest still name net10.0 (the lowest supported build) + and fail fast if the set moves. --> - net10.0;net10.0-windows10.0.19041.0;net11.0;net11.0-windows10.0.19041.0 + + $(PurviewTargetFrameworksSupported);$([MSBuild]::Unescape($(PurviewTargetFrameworksSupported.Replace(';', '-windows10.0.19041.0;'))))-windows10.0.19041.0 WSL Containers (WSLC) backend for Purview.Containers: run WSLC-native throwaway Linux containers from any .NET 10 or .NET 11 project, with automatic Docker fallback. wsl;wslc;containers;linux;windows;testing;integration;testcontainers MIT diff --git a/src/tests/Wsl.UnitTests/BuildFeatureTests.cs b/src/tests/Wsl.UnitTests/BuildFeatureTests.cs index 761cceb..cb8c103 100644 --- a/src/tests/Wsl.UnitTests/BuildFeatureTests.cs +++ b/src/tests/Wsl.UnitTests/BuildFeatureTests.cs @@ -5,13 +5,18 @@ namespace Purview.Containers.Wsl; /// /// Guards the build shape of the net11.0 assembly documented in -/// docs/wiki/Consumer-Requirements.md. The net11.0 build is compiled with -/// runtime-async=on (Purview.BuildSdk's PurviewRuntimeAsync default), which removes the -/// compiler-generated state machines: async methods carry no , -/// the runtime tracks suspension instead, and live stack traces name the real methods. +/// docs/wiki/Consumer-Requirements.md. Purview.BuildSdk 2.2.0 makes both .NET 11 features +/// opt-in, so src/Directory.Build.props enables them explicitly; these tests fail if that +/// opt-in is lost. /// public class BuildFeatureTests { + /// + /// PurviewRuntimeAsync=true compiles with runtime-async=on, which removes the + /// compiler-generated state machines: async methods carry no + /// , the runtime tracks suspension instead, and live stack + /// traces name the real methods. + /// [Test] public async Task Net11AssemblyUsesRuntimeAsync() { @@ -21,4 +26,20 @@ public async Task Net11AssemblyUsesRuntimeAsync() await Assert.That(stateMachine).IsNull(); } + + /// + /// MemorySafetyRules=2 compiles with the C# 15 updated-memory-safety-rules feature, + /// which marks the module with MemorySafetyRulesAttribute. + /// + [Test] + public async Task Net11AssemblyUsesUpdatedMemorySafetyRules() + { + var assembly = typeof(WslContainer).Assembly; + var marked = assembly + .ManifestModule.GetCustomAttributesData() + .Concat(assembly.GetCustomAttributesData()) + .Any(a => a.AttributeType.Name == "MemorySafetyRulesAttribute"); + + await Assert.That(marked).IsTrue(); + } } From efa2d8d3e20c103427b9327ad3d3479cabd893bc Mon Sep 17 00:00:00 2001 From: Kieron Lanning Date: Wed, 18 Nov 2026 14:44:04 +0000 Subject: [PATCH 2/6] build(deps): bump dependencies to their latest releases Aspire.Hosting 17.0.0, Testcontainers 4.17.0, Microsoft.Extensions.Telemetry.Abstractions 11.0.0, Purview.Telemetry.SourceGenerator 6.0.1, SourceLink 11.0.100, TUnit 1.87.0 and the test-only clients. Every shipped dependency still ships a net10.0 asset, so the .NET 10 floor is unchanged. --- Directory.Packages.props | 36 +++++++++++++++--------------- README.md | 2 +- docs/wiki/Consumer-Requirements.md | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 4534c24..9089c6d 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -29,7 +29,7 @@ 3.0.5 10.0.26100.80 - 1.76.0 + 1.87.0 @@ -38,20 +38,20 @@ .NET 10 servicing line on purpose: the .NET 8/.NET 9 lines are no longer supported, and a component declares the lowest band a consumer on the oldest supported framework can take. --> - + - + - + - - - + + + @@ -62,21 +62,21 @@ package is licensed under the Microsoft Testing Platform Tools terms, which permit use in OSI-approved open-source projects; it never ships in a Purview package. --> - - + + - - + + - + - - + + - - + + diff --git a/README.md b/README.md index a4be38a..46087aa 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ for inspection, and `.WithAutoRemove()` is opted into separately. See referencing the umbrella package, Testcontainers or WSLC. It verifies native paths, running WSL translations and explicit shared-remote mappings against the daemon using two-way file markers. `Purview.Containers.Aspire` adds opt-in `builder.AddContainerEnvironment()` integration for any -Aspire AppHost. Both target `net10.0` and `net11.0`; the adapter requires Aspire 13.6.5 or later. +Aspire AppHost. Both target `net10.0` and `net11.0`; the adapter requires Aspire 17.0.0 or later. These are separate from the existing Docker backend's automatic WSL2 path handling. Docker Engine inside a WSL distribution is not Microsoft WSL Containers. See the [environment package guide](src/src/Environment/Sdk/README.md) and diff --git a/docs/wiki/Consumer-Requirements.md b/docs/wiki/Consumer-Requirements.md index 22c2f4a..c5afdaa 100644 --- a/docs/wiki/Consumer-Requirements.md +++ b/docs/wiki/Consumer-Requirements.md @@ -35,7 +35,7 @@ for operation deadlines, resource ownership and native cancellation limits. | `Purview.Containers.Wsl` | `net10.0`, `net11.0`, `net10.0-windows10.0.19041.0` and `net11.0-windows10.0.19041.0` | The WSL Containers backend: portable facades plus the Windows implementations. **The requirements on this page are its contract.** | | `Purview.Containers.Docker` | `net10.0` and `net11.0`, any platform | The Docker backend (Testcontainers). Needs a reachable Docker daemon, not a Windows target framework. | | `Purview.Containers.Environment` | `net10.0` and `net11.0`, any platform | Standalone Docker-compatible CLI bind-sharing resolver; no Aspire, Testcontainers or WSLC dependency. | -| `Purview.Containers.Aspire` | `net10.0` and `net11.0`, any platform | Optional adapter requiring Aspire 13.6.5+ and the Environment package; no backend dependency. | +| `Purview.Containers.Aspire` | `net10.0` and `net11.0`, any platform | Optional adapter requiring Aspire 17.0.0+ and the Environment package; no backend dependency. | The standalone resolver requires a reachable Linux-container daemon through its selected CLI, working credential helpers on `PATH`, and client write access to bind-source directories for verification markers. From 38aba640117f2944c37dc7d0b909301294466b54 Mon Sep 17 00:00:00 2001 From: Kieron Lanning Date: Wed, 18 Nov 2026 15:03:02 +0000 Subject: [PATCH 3/6] fix: report a missing Docker daemon clearly and order the AutoSample build Testcontainers returns a null endpoint when no daemon is discovered, so every Docker call site failed with a bare NullReferenceException. Resolve it in one place (DockerEndpoint) and throw a ContainerBackendUnavailableException that says how to fix it; GetInfoAsync also names the endpoint on a timeout or refused ping. AutoSample copies Wsl's net10.0-windows output but nothing ordered that build first, so a parallel solution build could fail with "The Windows implementation is not built". Add a build-only project reference. --- .../AutoSample/AutoSample.csproj | 17 +++++++++ src/src/Docker/DockerContainer.cs | 13 ++----- src/src/Docker/DockerContainerBackend.cs | 38 ++++++++++++------- src/src/Docker/DockerEndpoint.cs | 34 +++++++++++++++++ src/src/Docker/DockerFileCopy.cs | 6 +-- src/src/Docker/DockerVolumeCleanup.cs | 4 +- src/src/Docker/WslDockerHost.cs | 8 ++-- 7 files changed, 85 insertions(+), 35 deletions(-) create mode 100644 src/src/Docker/DockerEndpoint.cs diff --git a/samples/getting-started/AutoSample/AutoSample.csproj b/samples/getting-started/AutoSample/AutoSample.csproj index 4b7fd83..52c2d7b 100644 --- a/samples/getting-started/AutoSample/AutoSample.csproj +++ b/samples/getting-started/AutoSample/AutoSample.csproj @@ -22,6 +22,23 @@ + + + + + - https://github.com/purview-dev/containers + + https://purview.dev/projects/containers/ From 0293f6e3e26db21579bc7a87aed53e9463143ce8 Mon Sep 17 00:00:00 2001 From: Kieron Lanning Date: Wed, 18 Nov 2026 15:03:16 +0000 Subject: [PATCH 6/6] docs: drop the experimental notices Remove the experimental, preview and no-support-guarantee notices from the README, wiki, package READMEs and skills. Versions stay on a -prerelease.N suffix until the stable 1.0.0, which includes the WSL Containers backend. Refresh stale version examples to prerelease.14 and describe the push-to-main build. --- AGENTS.md | 11 +++++--- README.md | 25 ++++++++----------- docs/wiki/Backends.md | 6 ++--- docs/wiki/Consumer-Requirements.md | 11 +++----- docs/wiki/Getting-Started.md | 3 --- docs/wiki/Home.md | 5 ---- docs/wiki/Release-Flow.md | 11 ++++---- docs/wiki/Using-in-Your-Tests.md | 6 ++--- skills/purview-containers-quickstart/SKILL.md | 3 --- src/src/Aspire/Sdk/README.md | 2 -- src/src/AzureKeyVaultEmulator/Sdk/README.md | 2 -- src/src/AzureServiceBusEmulator/Sdk/README.md | 2 -- src/src/Azurite/Sdk/README.md | 2 -- src/src/Containers/Sdk/README.md | 3 --- src/src/Core/Sdk/README.md | 3 --- src/src/Docker/Sdk/README.md | 3 --- src/src/Environment/Sdk/README.md | 2 -- src/src/MsSql/Sdk/README.md | 2 -- src/src/MySql/Sdk/README.md | 2 -- src/src/Nats/Sdk/README.md | 2 -- src/src/PostgreSql/Sdk/README.md | 2 -- src/src/RabbitMq/Sdk/README.md | 2 -- src/src/Redis/Sdk/README.md | 2 -- src/src/Wsl/Sdk/README.md | 2 -- 24 files changed, 32 insertions(+), 82 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index e90dfc5..10bb2f4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -164,8 +164,9 @@ whenever a target framework, a backend package or the `buildTransitive` assets c tests) registers explicitly instead — `WslcTest.EnsureBackendRegistered()`. - `src/Directory.Build.props` sets `EnableWindowsTargeting=true` because the shared CI agent is `ubuntu-latest`; removing it fails the pipeline with `NETSDK1100`. -- The project is **experimental**: keep the experimental notice in `README.md`, `docs/wiki/Home.md` and - the package READMEs, and keep versions on a `-prerelease.N` suffix. +- Versions stay on a `-prerelease.N` suffix until the stable 1.0.0 release, which includes the WSL + Containers backend. The docs, README and package READMEs must not carry experimental or preview + notices. ## Module rules @@ -256,8 +257,10 @@ Commit messages follow Conventional Commits enforced by the `commit-msg` lefthoo ## Versioning and releases - `package.json` is the authoritative release and package version. Do not diverge project versions by hand. -- `.github/workflows/pr.yml` builds and tests pull requests through the shared - `purview-dev/build/.github/workflows/purview-build.yml`, with pack and validation enabled. +- `.github/workflows/pr.yml` builds and tests pull requests **and every push to `main`** through the + shared `purview-dev/build/.github/workflows/purview-build.yml`, with pack and validation enabled (plus + the Docker and WSLC contract jobs). A push to `main` never publishes; superseded PR runs are + cancelled, `main` runs are not. - `.github/workflows/release.yml` runs the shared release pipeline with `release-mode: NuGet` on a push to a `release/**` branch (or a manual dispatch), **not** on a push to `main`. Cut a release by merging the version bump into `main`, then pushing a `release/v…` branch named after the version from it (for diff --git a/README.md b/README.md index 46087aa..0c0da21 100644 --- a/README.md +++ b/README.md @@ -34,21 +34,16 @@ Testcontainers' `WithCleanUp`: containers are removed by default, `.WithCleanUp( for inspection, and `.WithAutoRemove()` is opted into separately. See [Capabilities and Cancellation](docs/wiki/Backend-Capabilities.md) for APIs, ownership and limits. -> **Experimental.** This project is an experiment in running throwaway containers through Microsoft -> WSL Containers. The public API, defaults and packaging rules can change between prereleases, and -> there is no production support guarantee. Pin the exact package version you build against, and read -> [Consumer Requirements](docs/wiki/Consumer-Requirements.md) before adopting it. - -> **Status: preview.** Backend-neutral abstractions, two backends (WSL Containers and Docker), wait -> strategies, the `Image`/`Tag` parser, registry auth, observability, hardening, and **nine service -> modules** (PostgreSQL, Redis, SQL Server, RabbitMQ, Azurite, NATS, MySQL, Azure Key Vault Emulator, Azure Service Bus Emulator). On WSLC, **images are shared -> by default** (`StorageMode.Shared`): sessions reuse a stable image store -> (`%LOCALAPPDATA%\Purview\WslContainers\images`) so images are pulled once, not per session; -> `StorageMode.PerSession` provides isolation. Move the store with `PURVIEW_CONTAINERS_STORAGE_PATH` or -> `WslContainerRuntimeOptions.StoragePath`. Named volumes are retained by default; set -> `PURVIEW_CONTAINERS_CLEAN_VOLUMES=true` (or `ContainerCleanup.CleanUpVolumesOnExit`) to delete the -> volumes the library created when the process or session ends. Runnable samples live in -> `samples/getting-started`. +**Features.** Backend-neutral abstractions, two backends (WSL Containers and Docker), wait +strategies, the `Image`/`Tag` parser, registry auth, observability, hardening, and **nine service +modules** (PostgreSQL, Redis, SQL Server, RabbitMQ, Azurite, NATS, MySQL, Azure Key Vault Emulator, Azure +Service Bus Emulator). On WSLC, **images are shared by default** (`StorageMode.Shared`): sessions reuse a +stable image store (`%LOCALAPPDATA%\Purview\WslContainers\images`) so images are pulled once, not per +session; `StorageMode.PerSession` provides isolation. Move the store with +`PURVIEW_CONTAINERS_STORAGE_PATH` or `WslContainerRuntimeOptions.StoragePath`. Named volumes are retained +by default; set `PURVIEW_CONTAINERS_CLEAN_VOLUMES=true` (or `ContainerCleanup.CleanUpVolumesOnExit`) to +delete the volumes the library created when the process or session ends. Runnable samples live in +`samples/getting-started`. **Documentation:** [Containers documentation](https://purview.dev/docs/containers/) diff --git a/docs/wiki/Backends.md b/docs/wiki/Backends.md index d04c251..ceb1d39 100644 --- a/docs/wiki/Backends.md +++ b/docs/wiki/Backends.md @@ -224,7 +224,7 @@ dotnet add package Purview.Containers.Wsl enable - + ``` @@ -253,7 +253,7 @@ dotnet add package Purview.Containers.Docker enable - + ``` @@ -278,7 +278,7 @@ dotnet add package Purview.Containers enable - + ``` diff --git a/docs/wiki/Consumer-Requirements.md b/docs/wiki/Consumer-Requirements.md index c5afdaa..0c35c27 100644 --- a/docs/wiki/Consumer-Requirements.md +++ b/docs/wiki/Consumer-Requirements.md @@ -1,10 +1,5 @@ # Consumer Requirements -> **Experimental.** `Purview.Containers.*` is an experimental project: the public API, the -> defaults and these requirements can change between prereleases, and there is no production -> support guarantee. Treat every version as a preview and pin the exact package version you build -> against. - The WSL Containers backend package is **multi-target**. It ships Windows builds (`net10.0-windows10.0.19041.0` and `net11.0-windows10.0.19041.0`, the implementations, built on the `Microsoft.WSL.Containers` projection) and platform-neutral builds (`net10.0` and `net11.0`, facades). A @@ -180,8 +175,8 @@ runs on WSLC locally and Docker in CI with no further configuration: net10.0 - - + + ``` @@ -269,7 +264,7 @@ unconditionally — every inner build is supported: net10.0;net11.0;net10.0-windows10.0.19041.0 - + ``` diff --git a/docs/wiki/Getting-Started.md b/docs/wiki/Getting-Started.md index 138fec3..5490802 100644 --- a/docs/wiki/Getting-Started.md +++ b/docs/wiki/Getting-Started.md @@ -24,9 +24,6 @@ Everything runs on one of two backends; pick the one that matches your machine - The full consumer contract, every error, and the `EnableWindowsTargeting` workaround for non-Windows CI agents live in [Consumer Requirements](Consumer-Requirements.md). -> **Experimental.** The API, defaults and packaging rules can change between prereleases; there is no -> production support guarantee. - ## 1. Reference a package | Package | Use it when | diff --git a/docs/wiki/Home.md b/docs/wiki/Home.md index 3891366..0582862 100644 --- a/docs/wiki/Home.md +++ b/docs/wiki/Home.md @@ -9,11 +9,6 @@ capabilities the SDK does not expose. See [Capabilities and Cancellation](Backen This wiki is the project documentation hub. The packages are published under the `Purview.Containers.*` package IDs. -> **Experimental.** This project is an experiment in running throwaway containers through Microsoft -> WSL Containers. The public API, defaults and packaging rules can change between prereleases, and -> there is no production support guarantee. Pin the exact package version you build against and read -> [Consumer Requirements](Consumer-Requirements.md) before adopting it. - ## Start here - [Getting Started](Getting-Started.md) diff --git a/docs/wiki/Release-Flow.md b/docs/wiki/Release-Flow.md index 924363c..05d95f8 100644 --- a/docs/wiki/Release-Flow.md +++ b/docs/wiki/Release-Flow.md @@ -9,9 +9,9 @@ applies that value to `Version` and `PackageVersion` for every project, so a rel bump — never a manual project-file edit. `package.json` also carries the repository, homepage and issue URLs that end up in each nuspec. -The project is **experimental**, so versions stay on a `-prerelease.N` suffix: consumers should pin an -exact version rather than float, and each bump can change the API or the -[consumer requirements](Consumer-Requirements.md). +Versions use a `-prerelease.N` suffix until the stable 1.0.0 release, which will include the WSL Containers +backend. Until then, consumers should pin an exact version rather than float, and each bump can change +the API or the [consumer requirements](Consumer-Requirements.md). ## Local commands @@ -48,8 +48,9 @@ the run with the failing module's output. ## GitHub Actions -- `.github/workflows/pr.yml` — pull requests build and test via the shared - `purview-dev/build/.github/workflows/purview-build.yml`, with pack and validation enabled. +- `.github/workflows/pr.yml` — pull requests **and every push to `main`** build and test via the shared + `purview-dev/build/.github/workflows/purview-build.yml`, with pack and validation enabled, plus the + Docker and WSLC contract jobs. A push to `main` builds only; it never publishes. - `.github/workflows/release.yml` — a push to a **`release/**` branch** (or a manual `workflow_dispatch`) calls `purview-dev/build/.github/workflows/purview-release.yml` with `release-mode: NuGet`. It evaluates release eligibility and, when eligible, builds, tests, packs, publishes to NuGet and creates the diff --git a/docs/wiki/Using-in-Your-Tests.md b/docs/wiki/Using-in-Your-Tests.md index ffc4dd4..8d7364c 100644 --- a/docs/wiki/Using-in-Your-Tests.md +++ b/docs/wiki/Using-in-Your-Tests.md @@ -13,10 +13,10 @@ a Mac) — nothing changes between them. - - + + - + ``` diff --git a/skills/purview-containers-quickstart/SKILL.md b/skills/purview-containers-quickstart/SKILL.md index 396d895..2de75b8 100644 --- a/skills/purview-containers-quickstart/SKILL.md +++ b/skills/purview-containers-quickstart/SKILL.md @@ -14,9 +14,6 @@ metadata: Throwaway Linux containers for .NET tests, behind one API, over either **WSL Containers** (no Docker installation on Windows) or **Docker** (anywhere). The same test code runs on both. -> **Experimental and prerelease.** The API, defaults and packaging rules can change between releases. -> Pin the version you adopt. - ## Which package | Package | Use it when | diff --git a/src/src/Aspire/Sdk/README.md b/src/src/Aspire/Sdk/README.md index 006112e..7b5ce60 100644 --- a/src/src/Aspire/Sdk/README.md +++ b/src/src/Aspire/Sdk/README.md @@ -1,7 +1,5 @@ # Purview.Containers.Aspire -> **Experimental.** Pin the exact prerelease version; the API and defaults may change. - Apply verified container bind-source resolution to any Aspire AppHost. ```csharp diff --git a/src/src/AzureKeyVaultEmulator/Sdk/README.md b/src/src/AzureKeyVaultEmulator/Sdk/README.md index 6c92a28..dda336a 100644 --- a/src/src/AzureKeyVaultEmulator/Sdk/README.md +++ b/src/src/AzureKeyVaultEmulator/Sdk/README.md @@ -24,8 +24,6 @@ container can hand out clients that are already wired for the emulator. [consumer requirements](https://github.com/purview-dev/containers/blob/main/docs/wiki/Consumer-Requirements.md). - **Docker backend:** any reachable Docker daemon (`docker info`), with a `net10.0` or `net11.0` project on any platform. No Windows target framework and no `PCC` guards apply. -- **Experimental:** the API, defaults and packaging can change between prereleases; there is no - production support guarantee. - The emulator is not a replacement for Azure Key Vault; it exists to make developing against it easier. ## Quick start diff --git a/src/src/AzureServiceBusEmulator/Sdk/README.md b/src/src/AzureServiceBusEmulator/Sdk/README.md index f66688b..9954da7 100644 --- a/src/src/AzureServiceBusEmulator/Sdk/README.md +++ b/src/src/AzureServiceBusEmulator/Sdk/README.md @@ -28,8 +28,6 @@ its state in SQL Server), and needs a backend package (`Purview.Containers.Wsl` which is x64 only and needs at least 2000 MB of memory in the WSLC session VM or Docker host. On ARM64, `WithSqlServerImage("mcr.microsoft.com/azure-sql-edge:latest")` is an alternative the emulator supports. SQL Server 2022 does not start on WSLC (it fails to create `/.system` as the non-root `mssql` user). -- **Experimental:** the API, defaults and packaging can change between prereleases; there is no - production support guarantee. - The emulator is for local development and testing only; it is not a replacement for Azure Service Bus. ## Quick start diff --git a/src/src/Azurite/Sdk/README.md b/src/src/Azurite/Sdk/README.md index 4f9e232..0519b27 100644 --- a/src/src/Azurite/Sdk/README.md +++ b/src/src/Azurite/Sdk/README.md @@ -22,8 +22,6 @@ See the [Getting Started guide](https://github.com/purview-dev/containers/blob/m [consumer requirements](https://github.com/purview-dev/containers/blob/main/docs/wiki/Consumer-Requirements.md). - **Docker backend:** any reachable Docker daemon (`docker info`), with a `net10.0` or `net11.0` project on any platform. No Windows target framework and no `PCC` guards apply. -- **Experimental:** the API, defaults and packaging can change between prereleases; there is no - production support guarantee. ## Quick start diff --git a/src/src/Containers/Sdk/README.md b/src/src/Containers/Sdk/README.md index b16e3cb..8e27633 100644 --- a/src/src/Containers/Sdk/README.md +++ b/src/src/Containers/Sdk/README.md @@ -67,6 +67,3 @@ not change. - [Using it in your tests (auto)](https://github.com/purview-dev/containers/blob/main/docs/wiki/Using-in-Your-Tests.md) - [Backends: WSLC or Docker](https://github.com/purview-dev/containers/blob/main/docs/wiki/Backends.md) - [Modules](https://github.com/purview-dev/containers/blob/main/docs/wiki/Modules.md) - -> **Experimental.** The public API, defaults and packaging rules can change between prereleases; there is -> no production support guarantee. \ No newline at end of file diff --git a/src/src/Core/Sdk/README.md b/src/src/Core/Sdk/README.md index c5d9232..1c9a564 100644 --- a/src/src/Core/Sdk/README.md +++ b/src/src/Core/Sdk/README.md @@ -87,6 +87,3 @@ callers that want to apply their own policy. - [Purview.Containers.Wsl](https://www.nuget.org/packages/Purview.Containers.Wsl) — WSL Containers backend. - Documentation wiki: . - -> **Experimental.** The public API, defaults and packaging rules can change between prereleases, and -> there is no production support guarantee. Pin the exact package version you build against. diff --git a/src/src/Docker/Sdk/README.md b/src/src/Docker/Sdk/README.md index 878d074..a6d3024 100644 --- a/src/src/Docker/Sdk/README.md +++ b/src/src/Docker/Sdk/README.md @@ -69,6 +69,3 @@ PURVIEW_CONTAINERS_BACKEND=docker # or "auto" (the default) to probe WSLC fi store and bind mounts are untouched. - Log tailing polls the accumulated output until the container stops, because the Testcontainers API exposes no positioned log stream. - -> **Experimental.** The public API, defaults and packaging rules can change between prereleases, and -> there is no production support guarantee. Pin the exact package version you build against. diff --git a/src/src/Environment/Sdk/README.md b/src/src/Environment/Sdk/README.md index 505afed..a6ca33c 100644 --- a/src/src/Environment/Sdk/README.md +++ b/src/src/Environment/Sdk/README.md @@ -1,7 +1,5 @@ # Purview.Containers.Environment -> **Experimental.** Pin the exact prerelease version; the API and defaults may change. - Resolve client-side bind sources against a Docker-compatible daemon without assuming the daemon runs on the client machine. This library has no Aspire or AspireC4 dependency. diff --git a/src/src/MsSql/Sdk/README.md b/src/src/MsSql/Sdk/README.md index f0f4b7d..ab2572d 100644 --- a/src/src/MsSql/Sdk/README.md +++ b/src/src/MsSql/Sdk/README.md @@ -21,8 +21,6 @@ connection-string generation and readiness probing. [consumer requirements](https://github.com/purview-dev/containers/blob/main/docs/wiki/Consumer-Requirements.md). - **Docker backend:** any reachable Docker daemon (`docker info`), with a `net10.0` or `net11.0` project on any platform. No Windows target framework and no `PCC` guards apply. -- **Experimental:** the API, defaults and packaging can change between prereleases; there is no - production support guarantee. ## Quick start diff --git a/src/src/MySql/Sdk/README.md b/src/src/MySql/Sdk/README.md index bd02535..fd72a58 100644 --- a/src/src/MySql/Sdk/README.md +++ b/src/src/MySql/Sdk/README.md @@ -21,8 +21,6 @@ connection-string generation. [consumer requirements](https://github.com/purview-dev/containers/blob/main/docs/wiki/Consumer-Requirements.md). - **Docker backend:** any reachable Docker daemon (`docker info`), with a `net10.0` or `net11.0` project on any platform. No Windows target framework and no `PCC` guards apply. -- **Experimental:** the API, defaults and packaging can change between prereleases; there is no - production support guarantee. ## Quick start diff --git a/src/src/Nats/Sdk/README.md b/src/src/Nats/Sdk/README.md index eda60d5..e22ea31 100644 --- a/src/src/Nats/Sdk/README.md +++ b/src/src/Nats/Sdk/README.md @@ -21,8 +21,6 @@ package — bring your own client. [consumer requirements](https://github.com/purview-dev/containers/blob/main/docs/wiki/Consumer-Requirements.md). - **Docker backend:** any reachable Docker daemon (`docker info`), with a `net10.0` or `net11.0` project on any platform. No Windows target framework and no `PCC` guards apply. -- **Experimental:** the API, defaults and packaging can change between prereleases; there is no - production support guarantee. ## Quick start diff --git a/src/src/PostgreSql/Sdk/README.md b/src/src/PostgreSql/Sdk/README.md index 68af22c..fef7ef2 100644 --- a/src/src/PostgreSql/Sdk/README.md +++ b/src/src/PostgreSql/Sdk/README.md @@ -21,8 +21,6 @@ See the [Getting Started guide](https://github.com/purview-dev/containers/blob/m [consumer requirements](https://github.com/purview-dev/containers/blob/main/docs/wiki/Consumer-Requirements.md). - **Docker backend:** any reachable Docker daemon (`docker info`), with a `net10.0` or `net11.0` project on any platform. No Windows target framework and no `PCC` guards apply. -- **Experimental:** the API, defaults and packaging can change between prereleases; there is no - production support guarantee. ## Quick start diff --git a/src/src/RabbitMq/Sdk/README.md b/src/src/RabbitMq/Sdk/README.md index e5ec9ed..0473edb 100644 --- a/src/src/RabbitMq/Sdk/README.md +++ b/src/src/RabbitMq/Sdk/README.md @@ -21,8 +21,6 @@ bring your own client. [consumer requirements](https://github.com/purview-dev/containers/blob/main/docs/wiki/Consumer-Requirements.md). - **Docker backend:** any reachable Docker daemon (`docker info`), with a `net10.0` or `net11.0` project on any platform. No Windows target framework and no `PCC` guards apply. -- **Experimental:** the API, defaults and packaging can change between prereleases; there is no - production support guarantee. ## Quick start diff --git a/src/src/Redis/Sdk/README.md b/src/src/Redis/Sdk/README.md index 76c9740..9e8050b 100644 --- a/src/src/Redis/Sdk/README.md +++ b/src/src/Redis/Sdk/README.md @@ -21,8 +21,6 @@ package — bring your own client. [consumer requirements](https://github.com/purview-dev/containers/blob/main/docs/wiki/Consumer-Requirements.md). - **Docker backend:** any reachable Docker daemon (`docker info`), with a `net10.0` or `net11.0` project on any platform. No Windows target framework and no `PCC` guards apply. -- **Experimental:** the API, defaults and packaging can change between prereleases; there is no - production support guarantee. ## Quick start diff --git a/src/src/Wsl/Sdk/README.md b/src/src/Wsl/Sdk/README.md index 52eb8aa..0aeae56 100644 --- a/src/src/Wsl/Sdk/README.md +++ b/src/src/Wsl/Sdk/README.md @@ -44,8 +44,6 @@ consuming assembly. To also run the same test code on Docker in Linux CI, refere [consumer requirements](https://github.com/purview-dev/containers/blob/main/docs/wiki/Consumer-Requirements.md). - Verify the host with `wsl --version` and `wslc version`. The library never installs or updates WSL itself; `WslContainerRuntime.GetInfoAsync()` reports what is missing. -- **Experimental:** this is an experiment in driving WSL Containers. The public API, defaults and - packaging rules can change between prereleases, and there is no production support guarantee. ## Quick start