[Bug] Time search attributes lose sub-second precision, and raise NoMethodError without `require 'time'`
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
Línea de trabajo
Empieza leyendo Temporalio::SearchAttributes._to_proto_pair, identificado en el issue como el codificador de valores Time; el payload no indica su archivo de origen ni una prueba. Comprueba cómo codifica el SDK las fracciones de segundo y carga la biblioteca estándar time, y luego usa la reproducción mínima para verificar que el valor serializado conserva la precisión inferior a un segundo y funciona sin un require 'time' en el nivel de la aplicación.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Set a TIME (Datetime) search attribute from Ruby and read the same value back.
Describe the bug
SearchAttributes._to_proto_pair encodes Time values with Time#iso8601, which writes zero fraction digits. Any sub-second part is dropped before the value reaches the server. The server keeps sub-second precision: a raw Datetime payload of "2027-01-15T08:00:00.123456789Z" comes back unchanged from DescribeWorkflowExecution. The Python, Go and .NET SDKs send fractional seconds.
Separately, Time#iso8601 and Time.iso8601 come from the time standard library, and the SDK never requires it. On Ruby 3.3, an application that does not load time itself (plain Ruby, no Rails) gets NoMethodError: undefined method 'iso8601' for an instance of Time as soon as it sets a TIME search attribute.
Minimal reproduction
require 'temporalio/client'
key = Temporalio::SearchAttributes::Key.new('MyTime', Temporalio::SearchAttributes::IndexedValueType::TIME)
time = Time.at(1_800_000_000, 123_456_789, :nanosecond, in: 'UTC')
_, payload = Temporalio::SearchAttributes._to_proto_pair(key, time)
puts payload.data
- Ruby 3.3 without
require 'time':NoMethodError: undefined method 'iso8601' for an instance of Time. - With
require 'time': prints"2027-01-15T08:00:00Z". Starting a workflow with this attribute and describing it returns2027-01-15 08:00:00 UTCinstead of2027-01-15 08:00:00.123456789 UTC.
Environment
- SDK: temporalio 1.10.0 and current
main - Ruby 3.3.x, Linux aarch64
- Server: Temporal CLI dev server started by
WorkflowEnvironment.start_local
- Lenguaje dominante
- Ruby
- Estrellas
- 207
- Forks
- 46
- Merge medio
- 1 d 15 h
- PR fusionados (30 d)
- 34
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de temporalio/sdk-ruby
-
[Bug] JSON payload decoding raises ArgumentError with json 3.x (JSON.parse options are keyword-only)Posiblemente ocupada @GregoryTravis la tomó hace 23 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
temporalio/sdk-ruby#595 · 4 comentarios · 2 asignados ·
Los mantenedores suelen responder en 1 día
-
[Bug] Illegal call tracing enabling scales with memory slowing down WFT executionPosiblemente ocupada @chris-olszewski la tomó hace 8 días. Abiertobug
temporalio/sdk-ruby#644 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Enable concurrent payload visiting - RubyPosiblemente ocupada @jmaeagle99 la tomó hace 23 días. Abierto
temporalio/sdk-ruby#616 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
External Payload Storage Foundation - RubyPosiblemente ocupada @jmaeagle99 la tomó hace 27 días. Abierto
temporalio/sdk-ruby#614 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[Bug] Exception in an unawaited Workflow::Future is silently swallowed, leaving the workflow stuck RUNNINGPosiblemente ocupada @GregoryTravis la tomó hace 23 días. Abiertobug
Dificultad 3/5 Medio día Aptitud para principiantes 40/100
temporalio/sdk-ruby#613 · 1 reacción · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de temporalio/sdk-ruby
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
nesquena/steward-os#79 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
voxpupuli/json-schema#585 ·
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
bridgetownrb/bridgetown#1134 ·
-
Go: a namespaced model's fixture file is loaded through `NewAdmin::Note()`, which doesn't parseAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
rubys/roundhouse#1820 ·