Skip to content

[hugin] Port the 7.2.3 β†’ 7.2.5 client surface - #305

Draft
redknightlois wants to merge 7 commits into
ravendb:v7.2from
redknightlois:draft-hugin.v7.2.5
Draft

[hugin] Port the 7.2.3 β†’ 7.2.5 client surface#305
redknightlois wants to merge 7 commits into
ravendb:v7.2from
redknightlois:draft-hugin.v7.2.5

Conversation

@redknightlois

@redknightlois redknightlois commented Aug 19, 2026

Copy link
Copy Markdown
Member

Ports everything the reference client (src/Raven.Client, 7.2.3 β†’ 7.2.5) gained into the Python client β€” every observable change in that delta: new public surface, wire changes, behavior changes, and bug fixes a caller or the server can see, in the client's own conventions. Nothing outside the delta is touched.

One commit per feature area:

  • Add the CDC Sink task surface β€” the configuration family, add/update operations, and registration across ongoing tasks, the database record, and the public exports
  • Add the 7.2.5 version header, S3 checksum flag, UsedBy, sink cursors β€” CLIENT_VERSION bump, DisableChecksumValidation on both S3 settings classes, usedBy surfaced across the connection-string family, pull-replication sink cursors
  • Add server-wide connection string operations β€” GET/PUT/DELETE server operations with raft semantics
  • Add Azure Service Bus queue support β€” connection settings, sink source, and queue-broker registration
  • Add AI conversation message reading and cancellation controls β€” GetConversationMessagesOperation with paging and detail levels, 404-as-None, plus cancelPendingActionTools and cancellation-aware streaming reads
  • Add SSO certificate metadata and edit parameters β€” certificate surface additions
  • Fix session cluster-transaction change-vector handling β€” change-vector handling for cluster-wide transactions

This PR was produced by hugin's reforge workflow; each commit carries its provenance trailer.

reforge added 7 commits August 19, 2026 01:59
Add the CdcSinkConfiguration family and the add/update operations, and
wire the task into ongoing-task info, the DatabaseRecord, and the public
exports. Serialization matches the reference client: CdcColumnMapping
omits Type when it is Default, CdcSinkTaskState keeps a
case-insensitive Tables dict whose keys keep their stored casing on the
wire, and CdcSinkTableLoadState writes null lists instead of empty
arrays.

The add/update commands are MaintenanceOperation/RavenCommand pairs with
the RaftCommand marker and a null-response throw, so server rejections
surface as RavenException through ExceptionDispatcher; no client-side
validation runs before the request is sent.

Reforge-Run: 20260819T014403Z-2668162-reforge
Bump RequestExecutor.CLIENT_VERSION to 7.2.5 so the Raven-Client-Version
header carries the new version. Add DisableChecksumValidation to the S3
backup and remote-attachment settings with value equality and
hashability that include the flag, matching the reference
Equals/GetHashCode overrides.

Expose UsedBy on every connection-string class through a typed
ConnectionStringUsage object parsed from the GET response; to_json never
writes it, so a GET -> from_json -> to_json round-trip does not leak the
server-computed metadata. Append HubCursor and SinkCursor to the
pull-replication-as-sink task info after AllowedSinkToHubPaths.

Reforge-Run: 20260819T014403Z-2668162-reforge
Add ServerWideConnectionString wrapping any concrete connection string
plus excluded databases, and put/get/remove operations against
/admin/configuration/server-wide/connection-strings.

The wrapper serializes the inner connection string with exactly one Type
key carrying the enum NAME string and ExcludedDatabases (null when
unset); UsedBy is server-computed metadata and is never written.
from_json dispatches on Type, yields None when Type is missing (the
server rejects such bodies), and parses the usages including their
DatabaseName. The GET query carries name then type, each only when set,
with the type value as the enum NAME, never the Python repr. Put and
remove implement the RaftCommand marker and raise on a null response
like the reference commands.

Reforge-Run: 20260819T014403Z-2668162-reforge
Add the AzureServiceBus broker type and the connection-settings classes,
which validate that exactly one authentication method is set: a
connection string containing sb://, a fully populated EntraId, or a
Passwordless with a namespace. get_service_bus_url extracts the sb://
endpoint from the connection string preserving input case, or builds
sb://{namespace}/ from the auth classes. to_json writes only the set
fields, to_audit_json masks the secrets, and all three classes implement
equality with a consistent hash.

AzureServiceBusSinkSource encodes a plain queue name as a queue and
'topic;subscription' as a topic subscription; entry validation reports
errors naming the script and the entry, with the reference error
messages.

Reforge-Run: 20260819T014403Z-2668162-reforge
Add GetConversationMessagesOperation with its options and typed results
for reading agent conversation messages, reachable from the store
through the maintenance executor. The command sends GET to
/ai/agent/conversation/messages with the raven 7-digit timestamp form
for before/after and the detail-level enum name; a 404 (null response)
leaves the result None, matching the reference SetResponse. Parameters
keep their native JSON types.

RunConversationOperation always appends cancelPendingActionTools to the
URL immediately after the debug parameter, and AiConversation resets
the flag after a successful run. The streaming loop observes a caller
cancellation signal between lines so a mid-stream cancel stops the read
promptly.

Reforge-Run: 20260819T014403Z-2668162-reforge
Add usage, sso_server_public_key_pinning_hashes, allow_any_sso_server,
and sso_identifiers to CertificateMetadata, with the CertificateUsage
and SsoProvider enums and the SsoIdentifier class.
CertificateDefinition.to_json writes the SSO keys after Disabled;
from_json defaults a missing Usage to None, missing lists to [], and
missing AllowAnySsoServer to False.

EditClientCertificateOperation.Parameters gains the three nullable SSO
fields. The edit body is written manually with conditional SSO keys: a
field is written only when provided (an empty list clears the stored
value), and each SsoIdentifier writes Domain only when non-empty. The
body is never built from CertificateDefinition.to_json, whose
unconditional SSO defaults would wipe a stored SSO configuration on a
plain permission edit.

Reforge-Run: 20260819T014403Z-2668162-reforge
Capture the Database-Cluster-Tx-Id response header into
SessionInfo.cluster_transaction_id in the request-executor success path,
guarded on the header's presence, before process_response. The session
needs the cluster id for the change-vector fix, mirroring the reference
client's SessionInfo chain.

UpdateEntityDocumentInfo splits a document's change vector on '|' when
the session has a cluster-transaction id: more than two parts throw with
the document id and vector in the message, otherwise the etag for the
cluster id is read from the LAST part only and
last_cluster_transaction_index advances to the max of the current value
and the etag. A null change vector is a no-op. ClientChangeVectorUtils
carries the separator and the GetEtagById logic (etag between the last
':' and the '-{id}' marker, 0 when the id is absent).

Reforge-Run: 20260819T014403Z-2668162-reforge
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