Skip to content

#413: auto-assign dynamic-tenant abstraction returns resolved assignment (2.7.0)#414

Merged
jeremydmiller merged 1 commit into
feat/411-remove-pipeline-introspectionfrom
feat/413-auto-assign-tenant-source
Jun 2, 2026
Merged

#413: auto-assign dynamic-tenant abstraction returns resolved assignment (2.7.0)#414
jeremydmiller merged 1 commit into
feat/411-remove-pipeline-introspectionfrom
feat/413-auto-assign-tenant-source

Conversation

@jeremydmiller
Copy link
Copy Markdown
Member

Closes #413 (the upstream half split out from the now-closed #409). Brings pooled/auto-assign tenancy models under the uniform dynamic-tenant management surface so a store-agnostic tool (CritterWatch) can manage them the same way it manages master-table tenancy — without sniffing the concrete tenancy type.

Minor bump: 2.6.1 → 2.7.0.

The decision (scope item 1)

Auto-assign/pooled models have no caller-supplied connection value — the assignment strategy picks the database/partition. Per the issue's recommended option (1), the auto-assign overload now reports the resolved assignment:

Out of scope (other repos)

Items 2–5 — ShardedTenancy conformance (Cardinality => DynamicMultiple, registry-backed AllActive/Refresh, Disable/Remove semantics), managed-partition conformance, and Wolverine MartenMessageDatabaseSource surfacing — live in Marten/Wolverine and depend on marten#4598.

Verification

  • CoreTests: 447/447 on net9.0 and net10.0 (8 multi-tenancy tests updated for the Task<string> return + resolved-id assertions).
  • Full solution builds clean.

Stacked on #412 (#411 / 2.6.1), which stacks on #410 (#409 / 2.6.0). Base is feat/411-remove-pipeline-introspection; GitHub auto-retargets as the chain merges. Merge order: #410#412#413, then publish 2.7.0.

🤖 Generated with Claude Code

…ignment (2.7.0)

Upstream half split out from #409. Pooled/auto-assign tenancy models (Marten
ShardedTenancy, conjoined managed partitions) have no caller-supplied connection
value — the assignment strategy picks the database/partition. Per the issue's
recommended option (1), the auto-assign overload now reports where the tenant
landed so a store-agnostic tool (CritterWatch) can manage these models uniformly
without sniffing the concrete tenancy type.

- IDynamicTenantSource<T>.AddTenantAsync(string tenantId, CancellationToken) now
  returns Task<string> — the resolved database id (sharded pool) or partition
  suffix (managed partitions). Default still throws NotSupportedException, so the
  change stays additive for caller-supplies-value sources, which keep
  AddTenantAsync(tenantId, connectionValue). (Evolves the void-Task overload added
  in #409/PR #410.)
- DynamicTenancyAdminExtensions: the auto-assign IServiceProvider/IHost entrypoint
  now returns Task<string?> — the resolved assignment from the provisioning source,
  or null when no dynamic source is registered (graceful no-op preserved).

JasperFx-side only; ShardedTenancy/managed-partition conformance and the Wolverine
MartenMessageDatabaseSource surfacing (scope items 2-5) are Marten/Wolverine repos
(depend on marten#4598). CoreTests 447/447 on net9.0 and net10.0; solution builds clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jeremydmiller jeremydmiller merged commit 1fc35a5 into feat/411-remove-pipeline-introspection Jun 2, 2026
jeremydmiller added a commit that referenced this pull request Jun 2, 2026
PRs #412 (#411) and #414 (#413) merged into their stacked PR bases rather than
main, so main carried #409 (2.6.x) but was missing #411's removals and #413's
Task<string> auto-assign change. This brings both onto main as a single
consolidated 2.8.0 release (supersedes the interim 2.6.0/2.6.1/2.7.0 bumps).

- #411: removed HttpChainDescriptor.Middleware/Postprocessors/ServiceDependencies,
  the MiddlewareStepDescriptor type, and graph-level HttpGraphUsage.MiddlewareTypes.
- #413: IDynamicTenantSource<T>.AddTenantAsync(tenantId, CancellationToken) now
  returns Task<string> (resolved database id / partition suffix); admin extensions
  surface it.

Version set to 2.8.0. CoreTests green on net9.0 and net10.0; solution builds clean.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant