feat(platform): support per-service URL overrides for local dev#96
Open
vldcmp-uipath wants to merge 1 commit into
Open
feat(platform): support per-service URL overrides for local dev#96vldcmp-uipath wants to merge 1 commit into
vldcmp-uipath wants to merge 1 commit into
Conversation
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>
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.
What
build_base_urlnow consultsresolve_service_url(endpoint_path)before constructing the final URL. When aUIPATH_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
localhostwithout having to fake the full platform routing layer.Changes
build_base_urlto compute anendpoint_path, then resolve overrides once at the end.resolve_service_urlfromuipath.platform.common.Testing
pytest tests/core/features/settings/test_platform.py— 27 passed (2 new).🤖 Generated with Claude Code