Skip to content

Add WithDataVolume/WithDataBindMount and fix flaky integration tests#290

Merged
ElanHasson merged 5 commits intomainfrom
feature/data-volume-persistence
Mar 7, 2026
Merged

Add WithDataVolume/WithDataBindMount and fix flaky integration tests#290
ElanHasson merged 5 commits intomainfrom
feature/data-volume-persistence

Conversation

@ElanHasson
Copy link
Copy Markdown
Contributor

Summary

  • Add WithDataVolume() and WithDataBindMount() convenience methods for persisting Temporal's SQLite database across container restarts, following the Aspire convention (Postgres, Valkey, NATS pattern)
  • Add persistent Temporal container sample to AppHost
  • Fix flaky integration tests by removing hardcoded isProxied: false endpoints and serializing integration test classes with [Collection("Integration")]

Closes #258

Test plan

  • 5 new unit tests for WithDataVolume and WithDataBindMount (annotations + mount types)
  • Full test suite passes: 100/100 (stable across multiple runs)
  • Sample AppHost builds successfully

Changes

File Change
src/.../TemporalServerResourceExtensions.cs Add WithDataVolume() and WithDataBindMount()
tests/.../TemporalFluentApiTests.cs 5 new tests
tests/.../TemporalIntegrationTests.cs Use existing server endpoint, add [Collection]
tests/.../TemporalClientIntegrationTests.cs Use existing server endpoint, add [Collection]
sample/AppHost/Program.cs Add persistent Temporal container sample

🤖 Generated with Claude Code

ElanHasson and others added 3 commits March 7, 2026 16:17
…nce (#258)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use non-proxied server endpoint instead of separate grpc-direct endpoint.
Add [Collection("Integration")] to prevent parallel port 7233 conflicts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ElanHasson and others added 2 commits March 7, 2026 17:34
…ndMount

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tory

Instead of overriding the db filename, respect any existing
TemporalDbFileNameAnnotation and mount the volume to its directory.
Only set the default /data/temporal.db if no annotation exists.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ElanHasson ElanHasson merged commit c6f35a0 into main Mar 7, 2026
2 checks passed
@ElanHasson ElanHasson deleted the feature/data-volume-persistence branch March 7, 2026 22:42
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.

Is it possible to use volumes to persist sqlite database between restarts?

1 participant