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

Đang mở Phù hợp với người mới
#4,630 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@inchang-ing đang làm issue này rồi.

Từ ngày 18/10/2026.

  • #4633 của @inchang-ing — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
88/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
data

Hướng nghiên cứu

Bắt đầu với HTTPClient.delete, Row.delete và Column.delete trong Traceloop SDK, so sánh các kiểm tra lỗi của chúng với Datasets.delete_by_slug. Tái hiện các phản hồi 503 và 403 được mock, sau đó cập nhật hai kiểm tra để giữ nguyên trạng thái cục bộ và phát sinh lỗi. Chạy các bài kiểm thử dataset hiện có và thêm hoặc cập nhật kiểm thử hồi quy tập trung vào các lỗi khi xóa hàng và cột.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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?

Ngôn ngữ chính
Python
Star
7.5k
Fork
1.2k
Merge trung bình
2 ngày 6 giờ
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của traceloop/openllmetry

Tất cả issue của traceloop/openllmetry

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.