fix(resources): accept legacy target field for uploads#1659
fix(resources): accept legacy target field for uploads#1659xychendave wants to merge 1 commit intovolcengine:mainfrom
Conversation
|
tgg_ai_studio seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
PR Reviewer Guide 🔍(Review updated until commit 1228f29)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|
Persistent review updated to latest commit 1228f29 |
PR Code Suggestions ✨No code suggestions found for the PR. |
Description
Add backward compatibility for legacy console upload payloads by accepting the deprecated
targetfield inAddResourceRequestand mapping it toto.This prevents older deployed console bundles from failing during the second step of the upload flow.
Related Issue
Type of Change
Changes Made
targetas a deprecated alias fortoinAddResourceRequesttocontinue to take precedenceTesting
Runtime validation performed in this environment:
0.3.9deployment wheretemp_uploadsucceeded andPOST /api/v1/resourcesfailed with422Note: the focused
pytestrun was not executed here becausepytestwas not installed in the available virtualenv.Checklist
Additional Notes
The root cause was a drift between older published console bundles and the current server request schema:
targetto/parentBecause the request model forbids unknown fields, the upload flow failed before request handling logic could normalize the input.