[BUG] Notebooks: markdown cell `id` is regenerated on every GET

Abierto
#807 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
rust
Área
api, cli

Línea de trabajo

Comienza con la reproducción documentada de pup notebooks create y pup api v1/notebooks/{id} --no-agent usando /tmp/nb.json y, a continuación, compara las respuestas GET repetidas. El informe identifica el comportamiento como del lado del servidor y hace referencia a #554, pero no indica ningún archivo del repositorio ni ninguna prueba que cambiar. Se considera terminado cuando los notebooks sin cambios devuelven ids de celda estables y únicos en las solicitudes GET, tanto para markdown como para otros tipos de celda.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug product:dashboards usability

similar to https://github.com/DataDog/pup/issues/554

Describe the bug

pup notebooks get returns a different id for every markdown cell on each call, while graph cells (e.g. timeseries) keep stable ids. The same happens through the raw passthrough (pup api v1/notebooks/{id}), so the ids change in the API response itself, not in pup's client layer. same layering as #554.

This makes markdown cells unaddressable: any get -> modify -> update workflow that relies on cell ids cannot reference a markdown cell across two calls.

To Reproduce

Save as /tmp/nb.json:

{
  "data": {
    "type": "notebooks",
    "attributes": {
      "name": "markdown cell id stability test",
      "status": "published",
      "time": { "live_span": "1h" },
      "cells": [
        { "type": "notebook_cells", "attributes": { "definition": { "type": "markdown", "text": "# Section" } } },
        { "type": "notebook_cells", "attributes": { "definition": { "type": "timeseries", "requests": [ { "display_type": "line", "q": "avg:system.cpu.user{*}" } ] } } }
      ]
    }
  }
}
pup notebooks create --file /tmp/nb.json   # note the returned notebook id
for i in 1 2 3; do
  pup api v1/notebooks/$NB_ID --no-agent | jq -c '[.data.attributes.cells[] | {id, type: .attributes.definition.type}]'
done

Observed (no writes between the three GETs):

[{"id":"2l892wv8","type":"markdown"},{"id":"5k2rqfa5","type":"timeseries"}]
[{"id":"fwhey19c","type":"markdown"},{"id":"5k2rqfa5","type":"timeseries"}]
[{"id":"sjguoeel","type":"markdown"},{"id":"5k2rqfa5","type":"timeseries"}]

The markdown cell gets a fresh id on every GET; the timeseries id is stable.

Expected behavior

Cell ids should be stable across GETs of an unchanged notebook, and unique within a single response, for all cell types.

Additional observations (same root symptom, not minimally reproduced)

On a long-lived notebook that had received several notebooks update calls, GET responses additionally showed:

  • an empty markdown cell ({"type":"markdown","text":""}) after every timeseries cell, each with a fresh id per GET; updates whose payload omits these cells do not durably remove them;
  • the same cell id appearing twice within a single GET response (4 duplicated ids among 12 timeseries cells).

A freshly created notebook does not show either symptom (single, repeated, rapid-succession, id-bearing and id-stripped updates all round-trip cleanly), so these look like a server-side state/merge condition. Reported together because the markdown id instability above makes id-based diagnosis or repair of such a notebook impossible via the API.

Environment

  • OS: macOS 26 (aarch64)
  • Pup version: 0.65.4 (rust 1.95.0)
  • Auth: OAuth2, site datadoghq.com
  • Reproduces identically via pup api v1/notebooks/{id} raw passthrough (server-side, cf. #554)
Lenguaje dominante
Rust
Estrellas
1k
Forks
138
Merge medio
17 h
PR fusionados (30 d)
82

Preparar el entorno

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 DataDog/pup

Todos los issues de DataDog/pup

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.