Skip to content

Commit 7957588

Browse files
Merge branch 'main' into fix/7119-session-events-leak
2 parents 2df4e2e + 5631755 commit 7957588

28 files changed

Lines changed: 248 additions & 25 deletions

File tree

‎.release-please-manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "2.0.1"
2+
".": "2.1.0"
33
}

‎CHANGELOG.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Changelog
22

3+
## [2.1.0](https://github.com/googleapis/python-aiplatform/compare/v2.0.1...v2.1.0) (2026-09-01)
4+
5+
6+
### Features
7+
8+
* Add execute_bash to the Agent Engine sandbox SDK. ([505bd42](https://github.com/googleapis/python-aiplatform/commit/505bd42f65a8730793c7592ffa61d3f5b80f04cf))
9+
* Allow setting `ingress_control_config` when creating a `SandboxEnvironmentTemplate` via the SDK (Python, Java, JS). ([2dccde8](https://github.com/googleapis/python-aiplatform/commit/2dccde8797ea3bb1137170f2f377e3f978209b1c))
10+
* Expose SandboxEnvironmentTemplateState as a standalone enum class in the Python, Java, and JS SDKs. ([a31d2ba](https://github.com/googleapis/python-aiplatform/commit/a31d2ba1887966e6f65624526095cdc941c4748d))
11+
* Expose STATE_PAUSED, STATE_PAUSING, and STATE_RESUMING values in the SandboxState enum for SandboxEnvironment across Python, Java, and JS SDKs. ([ec342d9](https://github.com/googleapis/python-aiplatform/commit/ec342d94ab1c9fd43f4cee5679b8e7d349a92396))
12+
13+
14+
### Bug Fixes
15+
16+
* Guard the post-LRO refresh in sandboxes.pause() and sandboxes.resume() on the presence of a resource name in the LRO response. ([2c60077](https://github.com/googleapis/python-aiplatform/commit/2c60077ae9ca124e87dc53be1c759a81ab074923))
17+
* Preserve rrf_ranking_alpha=0.0 in MatchingEngineIndexEndpoint hybrid queries ([7e1c95a](https://github.com/googleapis/python-aiplatform/commit/7e1c95a7aec5ab2d122e454a467ab489cfb7baad))
18+
19+
20+
### Documentation
21+
22+
* Update CHANGELOG.md to mark version 2.0.0 as yanked ([75f9361](https://github.com/googleapis/python-aiplatform/commit/75f9361e0038cbe80585b94cd052da63aafe4672))
23+
324
## [2.0.1](https://github.com/googleapis/python-aiplatform/compare/v2.0.0...v2.0.1) (2026-08-28)
425

526

‎agentplatform/_genai/sandboxes.py‎

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,6 +1168,85 @@ def execute_code(
11681168

11691169
return response
11701170

1171+
def execute_bash(
1172+
self,
1173+
*,
1174+
name: str,
1175+
command: str,
1176+
cwd: Optional[str] = None,
1177+
timeout: Optional[int] = None,
1178+
port: str = "8080",
1179+
config: Optional[types.ExecuteCodeRuntimeSandboxConfigOrDict] = None,
1180+
) -> dict[str, Any]:
1181+
"""Runs a bash command in a shell sandbox.
1182+
1183+
The sandbox must have been created with a shell environment, either by
1184+
passing `spec={"shell_environment": {}}` to `create()` or by referencing a
1185+
template whose `default_container_category` is
1186+
`DEFAULT_CONTAINER_CATEGORY_SHELL_SANDBOX`.
1187+
1188+
Unlike `send_command`, this authenticates with the caller's own credentials,
1189+
so it needs no service account and no signed JWT.
1190+
1191+
Args:
1192+
name (str):
1193+
Required. The name of the agent engine sandbox to run the command
1194+
in, of the form
1195+
projects/*/locations/*/reasoningEngines/*/sandboxEnvironments/*.
1196+
command (str):
1197+
Required. The bash command to run.
1198+
cwd (str):
1199+
Optional. The working directory to run the command in. Defaults to
1200+
the sandbox's workspace directory.
1201+
timeout (int):
1202+
Optional. Seconds to allow the command to run before the sandbox
1203+
kills it. Defaults to the sandbox's own limit.
1204+
port (str):
1205+
Optional. The port the shell server listens on. Defaults to "8080".
1206+
config (ExecuteCodeRuntimeSandboxConfigOrDict):
1207+
Optional. The configuration for the request.
1208+
1209+
Returns:
1210+
dict[str, Any]: The result of the command, with keys `stdout`,
1211+
`stderr`, `returncode` and `duration_ms`. A command that exits
1212+
non-zero is reported here rather than raised.
1213+
1214+
Raises:
1215+
ValueError: If the sandbox returns no output.
1216+
"""
1217+
request: dict[str, Any] = {"command": command}
1218+
if cwd is not None:
1219+
request["cwd"] = cwd
1220+
if timeout is not None:
1221+
request["timeout"] = timeout
1222+
1223+
# The sandbox proxy addresses the container by URI and port, and forwards
1224+
# the JSON chunk as the POST body.
1225+
response = self._execute_code(
1226+
name=name,
1227+
inputs=[
1228+
types.Chunk(
1229+
mime_type="application/x.sandbox-request-uri",
1230+
data=b"/exec",
1231+
),
1232+
types.Chunk(
1233+
mime_type="application/x.sandbox-request-port",
1234+
data=port.encode("utf-8"),
1235+
),
1236+
types.Chunk(
1237+
mime_type="application/json",
1238+
data=json.dumps(request).encode("utf-8"),
1239+
),
1240+
],
1241+
config=config,
1242+
)
1243+
1244+
for output in response.outputs or []:
1245+
if output.data:
1246+
return json.loads(output.data.decode("utf-8"))
1247+
1248+
raise ValueError(f"The sandbox {name} returned no output for the command.")
1249+
11711250
def get(
11721251
self,
11731252
*,

‎agentplatform/version.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
#
1515
"""Version file for agentplatform."""
1616

17-
__version__ = "2.0.1"
17+
__version__ = "2.1.0"

‎google/cloud/aiplatform/gapic_version.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.0.1" # {x-release-please-version}
16+
__version__ = "2.1.0" # {x-release-please-version}

‎google/cloud/aiplatform/v1/schema/predict/instance/gapic_version.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.0.1" # {x-release-please-version}
16+
__version__ = "2.1.0" # {x-release-please-version}

‎google/cloud/aiplatform/v1/schema/predict/instance_v1/gapic_version.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.0.1" # {x-release-please-version}
16+
__version__ = "2.1.0" # {x-release-please-version}

‎google/cloud/aiplatform/v1/schema/predict/params/gapic_version.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.0.1" # {x-release-please-version}
16+
__version__ = "2.1.0" # {x-release-please-version}

‎google/cloud/aiplatform/v1/schema/predict/params_v1/gapic_version.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.0.1" # {x-release-please-version}
16+
__version__ = "2.1.0" # {x-release-please-version}

‎google/cloud/aiplatform/v1/schema/predict/prediction/gapic_version.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.0.1" # {x-release-please-version}
16+
__version__ = "2.1.0" # {x-release-please-version}

0 commit comments

Comments
 (0)