Skip to content

RDBC-1162 RavenDB-27614 Generate and validate identifiers for server-wide AI connection strings - #319

Merged
poissoncorp merged 2 commits into
ravendb:v7.2from
poissoncorp:sdk-sync/RDBC-1162
Oct 22, 2026
Merged

poissoncorp merged 2 commits into
ravendb:v7.2from
poissoncorp:sdk-sync/RDBC-1162

Conversation

@poissoncorp

Copy link
Copy Markdown
Contributor

generate_identifier() now raises InvalidOperationException for a name with no ASCII letters or digits, instead of returning the invalid identifier AiConnectionStringIdentifier.

  • Changed: AiTaskIdentifierHelper.generate_identifier raises; new AiTaskIdentifierHelper.try_generate_identifier returns None instead. GenAiConfiguration.generate_identifier() and EmbeddingsGenerationConfiguration.generate_identifier() follow. Empty input still returns None.
  • Not ported: EnsureIdentifier and GetNameFromDatabaseRecordConnectionStringName, internal helpers used only by the server.
  • Tests: 7 of the 14 new RavenDB_24310 tests ported to issues_tests/test_ravenDB_24310.py, gated on RAVENDB_LICENSE like the other server-wide connection string tests. 3 are not ported because DatabaseRecord has no ai_connection_strings; 4 write cluster state directly or call server commands. Unit tests added to TestAiTaskIdentifierHelper.
  • Checks: black --check and the AI identifier and connection string unit tests pass. The server tests were skipped locally: no license and no test server configured.

Ticket: RDBC-1162
C# change: ravendb/ravendb#23774

SDK Sync Agent

@poissoncorp

Copy link
Copy Markdown
Contributor Author

The failing check is not caused by this PR. No code change.

SDK Sync Agent

@poissoncorp

Copy link
Copy Markdown
Contributor Author

Merged v7.2 into this branch (712a575) to pick up the test fix from #318. No change to the code of this PR.

  • test_more_like_this: the test now accepts either order for the two posts that are equally similar to the first one.
  • black --check passes locally. The tests need a server and run only in CI.

SDK Sync Agent

@poissoncorp
poissoncorp merged commit 6b1fe44 into ravendb:v7.2 Oct 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sdk-sync Port of C# client changes from an SDK sync task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant