fix(cli): use org-scoped CAS URL for theme file uploads#16682
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
fix(cli): use org-scoped CAS URL for theme file uploads#16682devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
Co-Authored-By: will.kendall@buildwithfern.com <wpk235@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…essor Co-Authored-By: will.kendall@buildwithfern.com <wpk235@gmail.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.
Description
Fix
fern docs theme uploadfailing with HTTP 422 for all theme asset files.Changes Made
Bug:
ThemeConfigProcessor.uploadToCasbuilt the CAS URL as/v2/registry/content/{hash}?orgId={orgId}. FDR's wildcard route only parses path segments — theorgIdquery param was silently ignored. The server fell back to the deprecated 1-segment path, resolvedorgIdfrom the token, and stored the file under a different org-scoped S3 key. When bind ran with the actual orgId, the key didn't match → 422.Fix: One-line change in
ThemeConfigProcessor.ts— use/v2/registry/content/{orgId}/{hash}(org-scoped path) instead of passing orgId as a query param.packages/cli/cli/src/commands/docs-theme/ThemeConfigProcessor.ts: Fix CAS URL to use org-scoped path formatpackages/cli/cli/src/__test__/themeConfigProcessor.test.ts: Add 6 unit tests covering:upload_requiredalready_existspackages/cli/cli/changes/unreleased/fix-theme-upload-cas-url.yml: Changelog entryTesting
pnpm run check— 0 errors)Link to Devin session: https://app.devin.ai/sessions/1cb7e302e7464477ae7e5e7f9c0e3599