Skip to content

Use invariant dates for time-series index names - #332

Draft
niemyjski wants to merge 3 commits into
FoundatioFx:mainfrom
niemyjski:fix/invariant-time-series-index-dates
Draft

niemyjski wants to merge 3 commits into
FoundatioFx:mainfrom
niemyjski:fix/invariant-time-series-index-dates

Conversation

@niemyjski

@niemyjski niemyjski commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Daily and monthly index names now use Gregorian dates regardless of the process culture, matching the existing parser. Both nested date-formatting calls explicitly use CultureInfo.InvariantCulture. Previously, Thai and Arabic calendars could produce names that maintenance interpreted as future or ancient Gregorian partitions.

Validation: 30 synthetic culture tests pass (12 failed before the fix), 152 local core tests pass, and the full Release solution builds with zero warnings/errors using published package dependencies. Independent Astra review found no blockers. Exact-head CI passed all 869 tests, including the Elasticsearch suite, on its first attempt. Local checks used no live services; hosted integration tests used CI containers.

Rollout warning: Existing culture-generated physical indexes and aliases are not automatically migrated and remain susceptible to incorrect date interpretation. Review affected deployments before rollout; this PR does not rename, delete, or migrate existing indexes or aliases.

Verification and implementation details
  • Covers exact daily/monthly physical names and aliases, producer/parser round trips, configured/explicit versions, and synthetic retention selection under en-US, de-DE, fr-FR, th-TH, and ar-SA.
  • Baseline example for 2026-10-05: Thai produced events-v2-2569.10.05; Arabic produced events-v2-1448.04.24. Synthetic Gregorian maintenance skipped expired Thai partitions and selected a recent Arabic partition. Deletion was overridden to record names only, and test configuration rejects Elasticsearch client access.
  • Culture scopes restore both current culture properties. Two obsolete assembly attributes were replaced with xUnit 4's equivalent Parallelization(Mode = None) because current main's xUnit package rejects the old properties at compile time. Test parallelization remains disabled; dependencies and workflows are unchanged.
  • Build: dotnet build Foundatio.Repositories.slnx --configuration Release -p:ReferenceFoundatioSource=false -p:ReferenceFoundatioRepositoriesSource=false.
  • Focused tests: dotnet tests/Foundatio.Repositories.Elasticsearch.Tests/bin/Release/net10.0/Foundatio.Repositories.Elasticsearch.Tests.dll -class Foundatio.Repositories.Elasticsearch.Tests.TimeSeriesIndexCultureTests.
  • Core tests: dotnet tests/Foundatio.Repositories.Tests/bin/Release/net10.0/Foundatio.Repositories.Tests.dll.
  • Local runtime: .NET SDK 10.0.401 / runtime 10.0.12; library builds include net8.0 and net10.0. Full Elasticsearch integration tests were not run locally.
  • Hosted CI verified head 5ee616b79bf8dcd6e65e10113c3f8f93ddcad16d: 869 passed, 0 failed, 0 skipped; build had zero warnings/errors. Packaging and both publishing steps were skipped.

This branch has not been deployed

No deployments
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