feat(admin): add image config with ACR temporary token support#1101
Open
Issac-Newton wants to merge 1 commit into
Open
feat(admin): add image config with ACR temporary token support#1101Issac-Newton wants to merge 1 commit into
Issac-Newton wants to merge 1 commit into
Conversation
Issac-Newton
added a commit
to Issac-Newton/ROCK
that referenced
this pull request
Jun 12, 2026
…vars Remove ROCK_IMAGE_REGISTRY/NAMESPACE/USERNAME/PASSWORD/BUILDER_IMAGE env vars from SDK defaults. ImageRegistry and BuilderConfig fields now default to None. Sandbox._resolve_image() fetches /image_config from admin to fill registry URL, namespace, credentials (temporary ACR tokens), and builder settings. Explicit user-provided values still take precedence over admin defaults. Depends on: alibaba#1101 (ACR image config infrastructure) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
423985d to
8acab08
Compare
e398eab to
edd681b
Compare
Add AcrConfig (registry + builder_image) dataclasses, GET /acr_config API returning temporary ACR credentials via GetAuthorizationToken, and aliyun-python-sdk-cr as an explicit admin dependency. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
edd681b to
e2b6cca
Compare
StephenRi
reviewed
Jun 15, 2026
| return RockResponse(result=result) | ||
|
|
||
|
|
||
| @sandbox_proxy_router.get("/acr_config") |
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
ImageRegistryConfig,ImageBuilderConfig,ImageConfigdataclasses to centralize image registry and builder configuration in YAML config filesget_client_config()toSandboxProxyServiceas a general backend config aggregator for SDK clients, with_gen_image_config()as the first config section using Alibaba Cloud ACRGetAuthorizationTokenAPI for temporary credentials (15-min TTL)GET /client_configendpoint — returns a dict of config sections (currentlyimage), extensible for future sectionsrefs #1102
Test plan
TestGetClientConfig— 3 unit tests: success with credentials, ACR failure omits image section, no client omits image sectionuv run pytest tests/unit/sandbox/test_sandbox_proxy.py::TestGetClientConfig -v🤖 Generated with Claude Code