Expose ORPHAN_LOCATION via GET /v1/config#5
Merged
Conversation
Copilot
AI
changed the title
Expose ORPHAN_LOCATION via GET /v1/config endpoint
Expose ORPHAN_LOCATION via GET /v1/config
May 31, 2026
Copilot created this pull request from a session on behalf of
skullydazed
May 31, 2026 01:15
View session
There was a problem hiding this comment.
Pull request overview
Adds a new authenticated GET /v1/config endpoint that exposes the server's ORPHAN_LOCATION setting so clients can learn the configured orphan container label (returning null when unset).
Changes:
- New
get_configroute handler readingORPHAN_LOCATIONfrom Flask config. - OpenAPI path
/v1/configandServerConfigschema (withorphan_locationnullable string). - Tests covering set value, null value, and unauthenticated 401 response.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| routes.py | Adds get_config() handler returning orphan_location from current_app.config. |
| openapi.yaml | Declares the new GET /v1/config operation and ServerConfig schema; inherits the global bearerAuth requirement. |
| tests/test_api_config.py | Adds tests for the set/null/unauthenticated cases using the existing app.app.config monkeypatch pattern. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Clients have no way to know the server's configured orphan container label, making it impossible to surface the default or offer alternatives when deleting containers.
Changes
openapi.yaml— newGET /v1/configendpoint (bearer-auth required) returning aServerConfigschemaroutes.py—get_config()handler readsORPHAN_LOCATIONfrom Flask app configtests/test_api_config.py— covers set value, null value, and unauthenticated accessResponse shape