Repository navigation
[Visibility][Elasticsearch] Change datetime format to always include nanos component in pagination filter - #11564
Merged
Merged
Conversation
rodrigozhou
force-pushed
the
rodrigozhou/fix-es-pagination
branch
from
August 13, 2026 22:19
52b60cb to
ceb488d
Compare
yiminc
approved these changes
Aug 13, 2026
yiminc
requested changes
Aug 13, 2026
yiminc
left a comment
Member
There was a problem hiding this comment.
limit the change to the pagination filter, to avoid broader behavior change.
rodrigozhou
force-pushed
the
rodrigozhou/fix-es-pagination
branch
from
August 14, 2026 18:29
ceb488d to
60e9007
Compare
…nanos component in pagination filters
rodrigozhou
force-pushed
the
rodrigozhou/fix-es-pagination
branch
from
August 14, 2026 18:39
60e9007 to
260aae9
Compare
yiminc
approved these changes
Aug 14, 2026
5 tasks
stpierre
pushed a commit
that referenced
this pull request
Aug 19, 2026
…nanos component (#11564) (#11619) ## What changed? Cherry pick #11564 to `cloud/v1.32.0-161` branch. ## Why? ^ ## How did you test it? - [ ] built - [ ] run locally and tested manually - [ ] covered by existing tests - [ ] added new unit test(s) - [ ] added new functional test(s) ## Potential risks
This was referenced Sep 3, 2026
awln-temporal
added a commit
that referenced
this pull request
Sep 3, 2026
## What changed? Backports the remaining merged PRs labeled [release/1.32.0](https://github.com/temporalio/temporal/issues?q=state%3Aclosed%20label%3Arelease%2F1.32.0) onto release/v1.32.x, in main merge order: - [#11599](#11599) Optimize Visibility PostgreSQL upgrade schema v1.14 - [#11723](#11723) Validate history pagination branch token against mutable state - [#11800](#11800) Capture panics in Visibility query converter - [#11813](#11813) Capture panic in ServiceErrorInterceptor - [#11829](#11829) Return empty Elasticsearch page token when the result is smaller than the page - [#11839](#11839) Fix FirstWorkflowTaskBackoff accumulation upon Continue-As-New - [#11801](#11801) Fix Visibility SQL query conversion [#11265](#11265) and [#11564](#11564) were already present on release/v1.32.x and are not duplicated here. ## Testing - Targeted unit tests for Visibility query conversion, RPC interception, History branch-token validation, and Continue-As-New backoff - make GOLANGCI_LINT_FIX=false GOLANGCI_LINT_BASE_REV=origin/release/v1.32.x lint-code --------- Co-authored-by: Rodrigo Zhou <[email protected]> Co-authored-by: Prathyush PV <[email protected]> Co-authored-by: Yichao Yang <[email protected]>
This was referenced Sep 12, 2026
simvlad
pushed a commit
that referenced
this pull request
Sep 12, 2026
…nanos component (#11564) Change datetime format to always include nanos component in Elasticsearch Visibility. Also added Visibility integration tests with Elasticsearch. With Elasticsearch, comparing dates without explicitly specifying all components can lead to unexpected results. Eg: `StartTime = '2023-04-05T06:07:08Z'` would match a workflow with `StartTime = '2023-04-05T06:07:08.100000000Z'`. This behavior is unexpected and can mess up with pagination. This PR fixes it so missing nanos components is always specified (in the example, it would be filled with 0s). - [x] built - [x] run locally and tested manually - [ ] covered by existing tests - [x] added new unit test(s) - [x] added new functional test(s) (cherry picked from commit adaa8f0) Backport notes: - The CI change is adapted: release/v1.30.x starts containers through the integration-test job's compose service list, so elasticsearch is added there rather than to a CONTAINERS env var. - tests/testcore/test_cluster.go keeps this branch's esConfig field and archiver wiring; only the index setup/teardown helpers move to persistence-tests. - The visibility suite uses require.EventuallyWithT instead of common/testing/await, searchattribute.EncodeValue instead of sadefs.MustEncodeValue, and drops the serializer argument to visibility.NewManager, none of which exist on this branch. - The errors.AsType refactor in visibility_store.go is left as errors.As, since this branch targets Go 1.25. - persistencetests.SetupEsIndex keeps this branch's PutMapping call for searchattribute.TestEsNameTypeMap().Custom(). main's copy of that helper no longer registers the custom search attributes, and without them the ES and OpenSearch functional tests query fields the index does not map.
simvlad
added a commit
that referenced
this pull request
Sep 14, 2026
## What changed? Cherry-picks the PRs labeled `release/1.31.3` onto `release/v1.31.x`. Merge conflicts were confined to test and CI code (plus the dependency pins in `go.mod`/`go.sum`) List of PRs: - #11190 - Update sqlparser dependency - #11265 - Update ringpop-go and tchannel-go - #11409 - Update sqlparser to v0.1.0 - #11564 - [Visibility][Elasticsearch] Change datetime format to always include nanos component - #11599 - Optimize Visibility PostgreSQL upgrade schema v1.14 - #11723 - Validate history pagination branch token against mutable state Also contains additional fixes: - Fixes the broken tests in CI after #12037: [Enable the test-invoke compute provider for DeploymentVersionSuite](e9390b3) ## Why? Security and reliability patch release for 1.31.3. ## How did you test it? - [X] built - [ ] run locally and tested manually - [ ] covered by existing tests - [ ] added new unit test(s) - [ ] added new functional test(s) ## Potential risks N/A --------- Co-authored-by: Rodrigo Zhou <[email protected]> Co-authored-by: Prathyush PV <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]>
simvlad
added a commit
that referenced
this pull request
Sep 14, 2026
## What changed? Cherry-picks the PRs labeled `release/1.30.7` onto `release/v1.30.x`, excluding #11014, which will be cherry picked independently List of PRs: - #11190 - Update sqlparser dependency - #11265 - Update ringpop-go and tchannel-go - #11409 - Update sqlparser to v0.1.0 - #11564 - [Visibility][Elasticsearch] Change datetime format to always include nanos component - #11723 - Validate history pagination branch token against mutable state Conflicts were in the dependency pins in `go.mod`/`go.sum`, in test and CI code, and in one production file: - `service/history/configs/config.go` - `NewConfig` on `main` has a `SendRawHistoryBytesToMatchingService` entry that does not exist on this branch. Kept this branch's two `SendRaw*` entries and added only `EnablePaginationTokenBranchValidation` and `EnablePaginationTokenBranchValidationShadowMode`. Two production edits were also needed where git reported no conflict: - `common/persistence/visibility/store/elasticsearch/visibility_store.go` - #11564 carries an incidental refactor to `errors.AsType[*query.ConverterError]`, a Go 1.26 stdlib API. This branch's `go` directive is 1.25.11, so those two call sites are left as `errors.As`. - `.github/workflows/run-tests.yml` - #11564 adds `elasticsearch` to a `CONTAINERS` env var that does not exist here. ## Why? Security and reliability patch release for 1.30.7. ## How did you test it? - [X] built - [ ] run locally and tested manually - [X] covered by existing tests - [X] added new unit test(s) - [ ] added new functional test(s) ## Potential risks `EnablePaginationTokenBranchValidation` defaults to `true`, so #11723's rejection path is live as soon as this ships. --------- Co-authored-by: Rodrigo Zhou <[email protected]> Co-authored-by: Prathyush PV <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
Change datetime format to always include nanos component in pagination filter in Elasticsearch Visibility.
Also added Visibility integration tests with Elasticsearch.
Why?
With Elasticsearch, comparing dates without explicitly specifying all components can lead to unexpected results.
Eg:
StartTime = '2023-04-05T06:07:08Z'would match a workflow withStartTime = '2023-04-05T06:07:08.100000000Z'.This behavior is unexpected and can mess up with pagination.
This PR fixes it so missing nanos components is always specified (in the example, it would be filled with 0s).
How did you test it?
Potential risks