Visitar URL original
Bug Report: Failed dataset deletes still remove local rows and columns · Issue #4630 · traceloop/openllmetry · GitHub
Skip to content

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

Open

Description

@ar8327

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?

Activity

  1. changed the title [-]Dataset row and column deletion mutates local state after HTTP failure[/-] [+]Bug Report: Failed dataset deletes still remove local rows and columns[/+] on Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions