Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Running backups and exports report completed_at as year 1 instead of None

Đang mở
#2,216 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

@RaphaelFakhri đang làm issue này rồi.

Từ ngày 21/10/2026.

  • #2217 của @RaphaelFakhri — đ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
30/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
api, backend

Hướng nghiên cứu

Start by reading the backup list and export status response parsing used by client.backup.list_backups(...) and client.export.get_status(...). Reproduce with an operation that is still running and inspect how each completedAt value becomes completed_at. Done means both fields are None until completion; pull request #2217 is already open, so check its status before starting.

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

Mô tả

While a backup or export is still running, Weaviate returns completedAt as Go's zero time, 0001-01-01T00:00:00.000Z. The client parses that value directly, so completed_at is datetime(1, 1, 1, tzinfo=UTC) instead of None:

  • client.backup.list_backups(...): BackupListReturn.completed_at
  • client.export.get_status(...): ExportStatusReturn.completed_at

Both fields are Optional[datetime] and default to None, so completed_at is None looks like the natural way to detect an unfinished operation, but it never matches.

Reproduction

Weaviate 1.40.0 with ENABLE_MODULES=backup-filesystem and EXPORT_ENABLED=true, client from main:

import weaviate
from weaviate.backup.backup import BackupStorage
from weaviate.export.export import ExportFileFormat

c = weaviate.connect_to_local()
# a collection with ~20k objects, so neither operation finishes instantly
c.backup.create(backup_id="bk2", backend=BackupStorage.FILESYSTEM)
for b in c.backup.list_backups(backend=BackupStorage.FILESYSTEM):
    print(b.status.value, repr(b.completed_at))

c.export.create(export_id="exp2", backend=BackupStorage.FILESYSTEM, file_format=ExportFileFormat.PARQUET)
s = c.export.get_status(export_id="exp2", backend=BackupStorage.FILESYSTEM)
print(s.status.value, repr(s.completed_at))

Output:

STARTED datetime.datetime(1, 1, 1, 0, 0, tzinfo=TzInfo(0))
TRANSFERRING datetime.datetime(1, 1, 1, 0, 0, tzinfo=TzInfo(0))

Raw GET /v1/export/filesystem/exp1 while running:

{"backend":"filesystem","classes":["Article"],"completedAt":"0001-01-01T00:00:00.000Z","id":"exp1","path":"/tmp/exports/exp1","shardStatus":{"Article":{"TsBLZBMHUJSh":{"status":"TRANSFERRING"}}},"startedAt":"2026-10-21T06:50:47.995Z","status":"TRANSFERRING"}

Expected

completed_at is None until the operation completes.

Cause

The server models declare CompletedAt strfmt.DateTime with json:"completedAt,omitempty". omitempty does not omit struct values, so an unset timestamp is serialized as the zero time instead of being left out.

Ngôn ngữ chính
Python
Star
228
Fork
167
Merge trung bình
2 ngày 22 giờ
Pull request đã merge (30 ngày)
20

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 weaviate/weaviate-python-client

Tất cả issue của weaviate/weaviate-python-client

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.