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

Open Beginner friendly
#4,630 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@inchang-ing is already working on this.

Since Oct 18, 2026.

  • #4633 by @inchang-ing — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
data

Research direction

Start with HTTPClient.delete, Row.delete, and Column.delete in the Traceloop SDK, comparing their failure checks with Datasets.delete_by_slug. Reproduce the mocked 503 and 403 responses, then update the two checks so local state is preserved and an error is raised. Run the existing dataset tests and add or update focused regression coverage for both row and column deletion failures.

Written by the indexing model from the issue text.

Description

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?

Dominant language
Python
Stars
7.5k
Forks
1.2k
Avg merge
2d 6h
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from traceloop/openllmetry

All issues in traceloop/openllmetry

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.