[services] strip services route prefix in python runtime#15097
[services] strip services route prefix in python runtime#15097ricardo-agz merged 15 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 1b738d7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📦 CLI Tarball ReadyThe Vercel CLI tarball for this PR is now available! Quick TestYou can test this PR's CLI directly by running: npx https://vercel-jpiv6gszh.vercel.sh/tarballs/vercel.tgz --helpUse in vercel.jsonTo use this CLI version in your project builds, add to your {
"build": {
"env": {
"VERCEL_CLI_VERSION": "vercel@https://vercel-jpiv6gszh.vercel.sh/tarballs/vercel.tgz"
}
}
}Python Runtime WheelA Python runtime wheel was also built for this PR. |
Remove the services route prefix in the Python runtime.
🧪 Unit Test StrategyComparing: Strategy: Code changed outside of a package - running all unit tests Affected packages - 40 (100%)
Results
This comment is automatically generated based on the affected testing strategy |
/pinginstead of/_/backend/ping.routePrefixis manually set invercel.json, we do not strip the route prefixSCRIPT_NAMEwith route prefix for WSGIroot_pathwith route prefix for ASGINote: There is duplicate code in the vercel python runtime and
vc_init_dev_asgi.pyandvc_init_dev_wsgi.py. Ideally, we should consolidatevc_init_dev_asgi.pyandvc_init_dev_wsgi.pyinto a singlevc_init_dev.py(later PR)Warning
High Risk Change
This PR adds route prefix stripping logic for Python runtime services, modifying request path handling in WSGI/ASGI environments which affects how requests are routed to user applications.
routePrefixSourcefield to Service type to distinguish configured vs auto-detected prefixesVERCEL_SERVICE_ROUTE_PREFIX_STRIPenv var to enable path stripping in Python runtimeRisk assessment for commit 1b738d7.