Fix config not propagated to data-plane URL construction in DataAPI and Sandbox.__get_client()#88
Draft
Fix config not propagated to data-plane URL construction in DataAPI and Sandbox.__get_client()#88
Conversation
…) config forwarding Agent-Logs-Url: https://github.com/Serverless-Devs/agentrun-sdk-python/sessions/0e50b98f-f5e7-4961-a4fc-b9669d0ee8af Co-authored-by: OhYee <[email protected]>
Copilot
AI
changed the title
[WIP] Fix Sandbox.delete_by_id config merging issue
Fix config not propagated to data-plane URL construction in DataAPI and Sandbox.__get_client()
Apr 20, 2026
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.
When
config(carryingaccount_id, region, credentials, etc.) was passed only at call time (not at construction), it was silently ignored during data-plane base URL assembly, causingValueError: account id is not seteven though a valid config was provided.Two independent bugs:
DataAPIHTTP methods ignoredconfiginwith_path()—get,post,put,patch,delete(and their_asyncvariants), pluspost_file,get_file,get_videoall calledself.with_path(path, query=query)without forwardingconfig. Sincewith_path→get_base_url(config)usesConfig.with_configs(self.config, config), the call-site config never reached URL construction.Sandbox.__get_client()always returned a config-lessSandboxClient()— so even if every downstream method receivedconfig=config, theSandboxDataAPIinstance embedded in the client was initialized with an empty config.Changes
agentrun/utils/data_api.py+__data_api_async_template.py: All 16 HTTP wrapper methods now passconfigtowith_path():agentrun/sandbox/sandbox.py+__sandbox_async_template.py:__get_client()now accepts and forwardsconfig:All ~20 call sites updated to pass
config=config.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
astral.sh/usr/bin/curl curl -LsSf REDACTED(dns block)If you need me to access, download, or install something from one of these locations, you can either: