Repository navigation
feat: accept environment presets when creating a SQL session - #102
Merged
Merged
Conversation
connect() takes environment_preset_id and environment_override_preset_id and sends them as environmentPresetId and environmentOverridePresetId only when set, so existing requests are unchanged.
An empty string resolves to the organization default on the server but still changed the session reuse identity and pool eligibility.
Member
Author
|
@salty-hambot review |
ClayMav
marked this pull request as ready for review
December 2, 2026 21:23
peterfoldes
approved these changes
Dec 2, 2026
peterfoldes
left a comment
Contributor
There was a problem hiding this comment.
Rubber stamp 🧂 — CI green, salty-hambot clean, no open threads.
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.
Summary
Studio Code will run each SQL file on a SQL session created with that file's saved execution settings, and those settings include environment presets (WBC-1737). Until now
connect()could only pass the runtime size and version.connect()now takes optionalenvironment_preset_idandenvironment_override_preset_id. They go into the session-creation request asenvironmentPresetIdandenvironmentOverridePresetId, the fields the API already accepts onKubeAppAPIPayload(studio-backendservices/api/src/dependencies/models.py:80-83).A field is sent only when it's set and not empty. Callers that don't use it send exactly the same body as before. An empty ID is omitted because the server treats it as the organization default, but sending it would still change session reuse and keep the session out of the warm pool.
Related Issues
Relates to WBC-1737 (Studio Code SQL execution).
Requester Checklist
Complete these before marking Ready for Review
Visual Proof
uv run pytest tests/: 371 passed.TestConnectEnvironmentPresetscovers four cases:Noneor""is omitted;{runtimeId, shutdownAfterInactiveSeconds, version, sessionType}, as on main.The forwarding test fails on
origin/main.Adversarial review: OpenAI GPT-6.2 Sol at xhigh.
Size Justification (if L/XL)
N/A. Size S.
Reviewer Checklist
If these are not met, close the tab — this PR is not ready for review
Made with Claude Opus 5.5 in Claude Code (T3 Code).