Repository navigation
Conversation
…ination ids
The data plane stores the turn coordination id ("<instanceId>/<uuid>") as
builder_session_execution_scope.admission_id, but the column was varchar(128)
while the same value is stored in builder_coord_lease.instance_id as
varchar(255). Long pod/host names push the coordination id past 128 chars, so
admission fails with "value too long for column admission_id".
Widen admission_id to varchar(255) to match the coordination lease column, and
add an idempotent ALTER so existing deployments created as varchar(128) are
widened too.
Fixes agentscope-ai#3558
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
5 tasks done
Contributor
Author
|
Closing: #4154 removed the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Starting a managed chat turn on Kubernetes fails with:
This is problem 1 of #3558 (the reporter worked around it with a manual
ALTER TABLE ... TYPE VARCHAR(1024)).Root cause
The data plane persists the per-turn coordination id as
builder_session_execution_scope.admission_id:TurnLeaseService.acquireOrConflictFencedmintsleaseOwnerId = instanceId.get() + "/" + UUID.randomUUID().SessionTurnRunnerpasseslease.coordinationId()intoSessionNativeLogService.beginAdmission->ManagedEventOutbox.beginAdmission, which stores it asadmission_id.The same value is stored in
builder_coord_lease.instance_id, which isvarchar(255), butadmission_idwas onlyvarchar(128).BuilderInstanceIdfalls back toprefix + "-" + host + "-" + pid + "-" + 8 hex chars(andpidalready contains the host), so a long pod/host name pushesinstanceId- and therefore the coordination id - past 128 chars. Admission then fails before the turn can start.Fix
SessionExecutionScopeEntity.admissionIdtolength = 255, matchingbuilder_coord_lease.instance_id. The coordination id can never exceed what the lease column already accepts, so the two columns now agree.agent-event-mirror-outbox-postgresql.sql: theCREATE TABLEusesvarchar(255), and an idempotentALTER TABLE ... ALTER COLUMN admission_id TYPE varchar(255)widens existing deployments created asvarchar(128)(Hibernateddl-auto: updatedoes not change the length of an existing column).Test
Added
SessionExecutionScopeAdmissionIdTest, which persists a 203-char admission id through JPA. It fails on the old schema withValue too long for column "ADMISSION_ID CHARACTER VARYING(128)"and passes after the change.Note: the same report also shows a
ux_builder_session_event_seqduplicate-key warning. That is the separate concurrent-append path inSessionEventLogand is intentionally not touched by this change.