Skip to content

feat(platform): support per-service URL overrides for local dev#96

Open
vldcmp-uipath wants to merge 1 commit into
mainfrom
feat/resolve-service-url-overrides
Open

feat(platform): support per-service URL overrides for local dev#96
vldcmp-uipath wants to merge 1 commit into
mainfrom
feat/resolve-service-url-overrides

Conversation

@vldcmp-uipath

Copy link
Copy Markdown
Contributor

What

build_base_url now consults resolve_service_url(endpoint_path) before constructing the final URL. When a UIPATH_SERVICE_URL_<SERVICE> env var is set (e.g. UIPATH_SERVICE_URL_AGENTHUB=http://localhost:8080), requests are redirected to that local server with the org/tenant and service prefix stripped. Without an override, behaviour is unchanged — the URL is still {base_url}/{endpoint_path}.

This makes it possible to point the client at a locally running service during development.

Why

Local development against a service running on localhost without having to fake the full platform routing layer.

Changes

  • Refactor each routing branch in build_base_url to compute an endpoint_path, then resolve overrides once at the end.
  • Import resolve_service_url from uipath.platform.common.
  • Add tests covering: override active (redirects + strips prefix) and an unrelated-service override being ignored.

Testing

pytest tests/core/features/settings/test_platform.py — 27 passed (2 new).

🤖 Generated with Claude Code

Use resolve_service_url to redirect requests to a local server when
UIPATH_SERVICE_URL_<SERVICE> is set, falling back to the platform
base URL otherwise.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant