alibaba / alibaba/ROCK

feat: add GET /server/config endpoint for public platform config

Open
#1,109 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

## Description

Add a new `GET /server/config` endpoint to expose platform-level public configuration to all clients (SDK, CLI, frontend).

## Motivation

Currently there is no unified way for clients to discover platform settings like image registry info and builder image. Each new config type would require a separate endpoint. A single `/server/config` endpoint provides an extensible container for all public configuration.

## Changes

- Add `ImageRegistryConfig` and `ServerConfig` dataclasses in `rock/config.py`
- Add `server` section in YAML config (`image_registries` list + `builder_image`)
- Add `GET /server/config` route on the proxy role
- Add `get_server_config()` method in `SandboxProxyService`
- Add unit tests

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the dataclasses in rock/config.py, then trace the proxy-role routes and SandboxProxyService to see where the new configuration belongs. Review the YAML configuration structure and existing unit-test patterns; the work is done when GET /server/config exposes the declared public settings and the unit tests cover the endpoint and service behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.