Skip to content

spp_api_v2: bundle entry ETags use float seconds, not the microsecond versionId used elsewhere #564

Open

Description

@gonzalesedwin1123

Problem

Batch/transaction bundle entries return "etag": str(record.write_date.timestamp()) — float seconds
(spp_api_v2/services/bundle_service.py, ~320-474). Every resource's meta.versionId / ETag header is integer
microseconds (str(int(write_date.timestamp() * 1000000))), which If-Match is compared against. A client echoing a
bundle ETag in If-Match gets 409.

This is the same drift as #554 item B (ProgramMembership PUT), fixed in PR #555 for that endpoint only.

Proposal

Use the microsecond format in bundle entries (ideally via the shared version helper proposed in #561), with a
test that a bundle ETag is accepted by the resource's PUT.

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions