RA-related updates#2491
Conversation
Allows for setting the initial description of results created by remote jobs.
Greptile SummaryThis PR adds object-sharing and metadata-only update APIs to the Coop client and exposes them as class methods on
Confidence Score: 4/5Mostly safe — the core Coop changes are well-structured, but the integration test for sharing hard-codes an email address that may not be registered in the test environment, which would cause the test to fail on every CI run. The sharing test asserts that a shared email appears in shared_with, but the server moves unrecognised emails into temp_shared_with instead. If b@b.b is not a pre-seeded registered account in the test environment, the assertion fails deterministically. All production code changes look correct. tests/coop/test_coop_objects.py — the sharing assertions assume b@b.b is a registered account; verify this holds in CI. Important Files Changed
Sequence DiagramsequenceDiagram
participant Caller
participant PersistenceMixin
participant Coop
participant Server
Caller->>PersistenceMixin: Survey.share(url_or_uuid, username)
PersistenceMixin->>Coop: share_object(url_or_uuid, username)
Coop->>Coop: _resolve_to_uuid(url_or_uuid)
alt plain UUID or content/uuid URL
Coop-->>Coop: return uuid directly
else alias URL (content/owner/alias)
Coop->>Server: GET api/v0/object/alias/info
Server-->>Coop: "{uuid}"
end
Coop->>Server: POST api/v0/object/share
Server-->>Coop: "{message, username, email}"
Coop-->>Caller: dict
Caller->>PersistenceMixin: Survey.patch_metadata(url_or_uuid, visibility)
PersistenceMixin->>Coop: patch_metadata(url_or_uuid, visibility)
Coop->>Coop: _resolve_uuid_or_alias(url_or_uuid)
alt UUID path
Coop->>Server: "PATCH api/v0/object?uuid=..."
else alias path
Coop->>Server: "PATCH api/v0/object/alias?owner_username=...&alias=..."
end
Server-->>Coop: updated metadata
Coop-->>Caller: dict
Reviews (2): Last reviewed commit: "Fix for aliases when sharing" | Re-trigger Greptile |
No description provided.