alibaba / alibaba/ROCK

feat(admin): provide unified backend config endpoint for SDK clients

Open
#1,102 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
485
Forks
81
Avg merge
16h 12m
Merged PRs (30d)
8

Description

## Background

SDK clients (e.g. `rl-rock` Python SDK) currently need to know various backend configuration values — image registry URL, builder image, OSS endpoints, etc. Some of these were previously hardcoded as environment variable defaults on the client side, which is fragile and requires redeployment when config changes.

## Proposal

Add a general-purpose admin API endpoint that returns all configurable backend settings that SDK clients may need. This should be a single endpoint that aggregates configuration from the admin's YAML config, covering:

- **Image registry**: registry URL, namespace, temporary ACR credentials (via `GetAuthorizationToken`)
- **Image builder**: builder image, startup timeout, auto-clear settings
- **OSS/storage**: endpoints, buckets, transfer prefixes (already partially covered by `/get_token`)
- **Other backend config**: any future configurable values the SDK needs at runtime

### Design Goals

1. **Single source of truth**: SDK clients fetch config from admin rather than relying on local env vars or hardcoded defaults
2. **Temporary credentials**: sensitive fields (registry passwords, STS tokens) use short-lived tokens, not long-lived secrets
3. **Extensible**: the response structure should accommodate new config sections without breaking existing clients
4. **Backward compatible**: existing env var overrides on the client side should still take precedence when set

### Initial Scope

Start with image registry + builder config (PR #1101 implements this as `GET /image_config`), then progressively consolidate other backend configs into a unified endpoint or namespace.

## Related

- PR #1101 — initial implementation for image config with ACR temporary token support

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the proposal and PR #1101, which implements the initial GET /image_config scope for registry and builder settings. Trace the existing admin configuration and SDK configuration paths, then define the remaining endpoint structure and migration boundaries. Done means SDK clients can obtain the required backend settings from one extensible admin API while existing environment overrides remain supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.