Bug Report: Failed dataset deletes still remove local rows and columns

Aperta Adatta ai principianti
#4,630 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@inchang-ing ci sta già lavorando.

Dal 18/10/2026.

  • #4633 di @inchang-ing — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
88/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
data

Direzione di ricerca

Inizia da HTTPClient.delete, Row.delete e Column.delete nel Traceloop SDK e confronta i loro controlli degli errori con Datasets.delete_by_slug. Riproduci le risposte 503 e 403 simulate, quindi aggiorna i due controlli in modo che lo stato locale venga preservato e venga generato un errore. Esegui i test esistenti dei dataset e aggiungi o aggiorna test di regressione mirati per gli errori di eliminazione di righe e colonne.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Which component is this bug for?

Traceloop SDK

Description

column.delete() removes the column and its values from the local dataset even when the delete request fails. row.delete() also removes the row on failure. Neither call raises an exception.

Reproduction steps

traceloop-sdk 0.62.4, with a mocked 503 response:

from unittest.mock import patch
import requests
from traceloop.sdk.client.http import HTTPClient
from traceloop.sdk.datasets.dataset import Dataset
from traceloop.sdk.datasets.column import Column
from traceloop.sdk.datasets.row import Row
from traceloop.sdk.datasets.model import ColumnType

http = HTTPClient("https://example.invalid", "test", "repro")
dataset = Dataset(http)
dataset.slug = "evaluation"
row = Row(http, dataset, "row-1", {"question": "What is 2 + 2?"})
column = Column(http, dataset, "question", "Question", ColumnType.STRING)
dataset.rows = [row]
dataset.columns = [column]
response = requests.Response()
response.status_code = 503
response._content = b'{}'

with patch("requests.delete", return_value=response):
    column.delete()

print(column.deleted, dataset.columns, row.values)
Expected behavior

Raise an error and leave the local rows, columns and values unchanged when the delete request fails.

Actual behavior

The HTTP error is logged, but column.delete() returns normally and prints:

True [] {}

The column is marked deleted and its values are gone. The same happens with a 403 response.

Python Version

3.12.14

Additional context

Also reproduced on main at 94d3f04. HTTPClient.delete returns False on failure, but Row.delete and Column.delete check for None. Datasets.delete_by_slug already checks the boolean result.

Have you spent some time to check if this bug has been raised before?
  • I checked and didn't find similar issue
Are you willing to submit PR?

Yes. Can I send a PR for these two checks?

Lingua principale
Python
Stelle
7.5k
Fork
1.2k
Merge medio
2g 6h
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di traceloop/openllmetry

Tutte le issue di traceloop/openllmetry

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.