Skip to content

fix: emit listing LastModified as RFC3339 'Z' (rclone rejects +00:00)#94

Merged
ServerSideHannes merged 1 commit into
mainfrom
fix/list-lastmodified-z-suffix
Jun 30, 2026
Merged

fix: emit listing LastModified as RFC3339 'Z' (rclone rejects +00:00)#94
ServerSideHannes merged 1 commit into
mainfrom
fix/list-lastmodified-z-suffix

Conversation

@ServerSideHannes

Copy link
Copy Markdown
Owner

Problem

After the V1→V2 routing fix (2026.6.10), the Scylla agent's list no longer 400s — it reaches the backend and returns data. But rclone 1.51.0 then fails parsing the timestamps:

parsing time "2026-06-30T10:24:43.399000+00:00" as "2006-01-02T15:04:05.999999999Z":
cannot parse "+00:00" as "Z"

The list serializer formats LastModified with Python's datetime.isoformat(), which emits a +00:00 offset. Real S3 returns RFC3339 in UTC with a Z suffix. botocore/aws-sdk tolerate +00:00; scylla-manager's rclone 1.51.0 is strict and rejects the entire listing.

Fix

Add _s3_timestamp() — formats as YYYY-MM-DDTHH:MM:SS.mmmZ (millisecond precision, UTC, Z suffix, matching real S3) — and use it for Contents/LastModified and multipart Initiated.

Test

tests/unit/test_s3_timestamp.py: UTC → …Z with millis; non-UTC converted to UTC Z (no +); non-datetime passthrough. Full unit suite green (549 passed); ruff check + format clean.

Chain: #91 (V2 token) → #92 (V1→V2 in handler) → #93 (route V1 to handler) → this (timestamp format) — the last hop for the Scylla agent's strict rclone parser.

The list serializer formatted timestamps with datetime.isoformat(), which
emits a '+00:00' offset. Strict S3 clients reject that: scylla-manager's
rclone 1.51.0 fails the whole ListObjects with "parsing time
'...+00:00' ... cannot parse '+00:00' as 'Z'", which surfaced as soon as
V1 lists started returning data (after the V1->V2 routing fix). Real S3
returns millisecond-precision RFC3339 in UTC with a 'Z' suffix.

Add _s3_timestamp() and use it for Contents/LastModified and multipart
Initiated. botocore tolerated '+00:00'; rclone does not.
@ServerSideHannes ServerSideHannes merged commit b2343b0 into main Jun 30, 2026
4 checks passed
@ServerSideHannes ServerSideHannes deleted the fix/list-lastmodified-z-suffix branch June 30, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant