Inconsistent response behavior with a 'values' array

Abierto
#204 1 comentario 0 reacciones 2 asignados Ver en GitHub

@pkolbeck ya está trabajando en esto.

Desde el 18/6/2025.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

Services and endpoints send responses differently depending on the request.

https://github.com/driplineorg/dripline-python/blob/2ff8c54e3464670c95dc9e044430a039042ca524/dripline/core/request_handler.py#L32

Calling get with a specifier, e.g. dl-agent get <service> -s <specifier> returns the value in a dictionary with the "values" key pointing to the value.
Calling get without a specifier, e.g. dl-agent get <endpoint> returns just the value (this could be a dictionary, string, float, etc).
Calling set with a specifier returns a value based on the return value of the implemented on_set.
Calling set without a specifier returns a None value.
Callng cmd (always requires a specifier) returns the value based on the return value of the function called in the implementation.

Out of all of these, only calling get with a specifier puts the return value into a 'values' array. This inconsistency in behavior does not serve a discernible purpose at the moment, and consistent behavior should be established by no longer putting values in a 'values' array.

Applying a calibration function and getting a dictionary of the form {"value_raw": <value_raw>, "value_cal": <value_cal>} would be unaffected.

Lenguaje dominante
Python
Estrellas
3
Forks
6
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de driplineorg/dripline-python

Todos los issues de driplineorg/dripline-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.