Skip to content

Python owner update sends id where the API requires username #179

Closed

Description

@maxlastglance

update_database_owner sends a field named id, while the endpoint expects username. The API returns HTTP 400. This client contract mismatch predates the audit fixes.

Reproduction

Call update_database_owner(database_id, username) on an owned synthetic database. The live runner uses the current owner for this contract check.

Observed results

Run Case Result Evidence
main database.owner.client failed PUT /api/v1/database/{id}/owner: HTTP 400 MalformedError
comparison database.owner.client failed PUT /api/v1/database/{id}/owner: HTTP 400 MalformedError

Acceptance criteria

The SDK sends the documented owner field and handles the success response. Verify both an unchanged owner and transfer to a second account. Cover missing and unknown usernames.

Keep the named live cases as regression checks. A successful HTTP write followed by an SDK exception remains a failure. Do not mark skipped prerequisites or expected failures as passes.

Test context

The paired user checks ran on 2026-11-06 with the same Python client and runtime. The candidate was deployed from main 18135fa648582bde3c34136deefb8350a0ea588f. The comparison UI advertised integration 9ce8038786ae1ed320bedd99a30896adf2ab1b56; this does not independently identify every backend image. Deployments and existing data differ. The full-profile run is separate and has no matching baseline full run.

Python 3.11.18; client source SHA-256 de68a3c04b5e5acaed4b9b35e43cd440ac2e63b66f2f420b88859ae576be958c. Test resources were synthetic.

Activity

  1. maxlastglance commented on Nov 7, 2026

    @maxlastglance
    ContributorAuthor

    Prepared in the separate SDK commit of PR #192. The client sends username and parses DatabaseBrief, so ownership transfer does not depend on an additional read by the former owner. Same-owner, invalid-target and wire-shape tests pass; the live SDK owner case passes. The new PR is awaiting maintainer review.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions