Repository navigation
Require GUIDs for Connect content; add --guid to deploy and preflight - #915
nealrichardson wants to merge 3 commits into
Conversation
Remove the legacy numeric content ID path (app_get, get_content_by_id, ContentItemV0) and use content_get directly. An explicit --app-id for a Connect target must be a content GUID. Add --guid to the deploy commands and preflight as the Connect-specific way to target existing content. It conflicts with --app-id and --new, and is rejected for Connect Cloud and shinyapps.io targets. Fixes #881 Fixes #885 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ound The GUID may come from --guid or --app-id, and --new cannot be combined with either, so suggest omitting the ID instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
joshyam-k
left a comment
There was a problem hiding this comment.
this all makes sense to me. only consideration that comes to mind is what kind of a version bump we should go with in the release given that this is a breaking change. It's not a huge change and there are instructions for what to do differently, but this will break scripts that rely on the prior behavior.
mconflitti-pbc
left a comment
There was a problem hiding this comment.
Looks good!
Two minor things to consider:
-
Numeric IDs from saved deployment records skip the GUID check.
validate_explicit_app_id()checks only an explicit--app-idor--guid. Invalidate_app_mode(), anapp_idthat comes fromapp_store.resolve()gets no check. If an old deployment record has only a numericapp_idand noapp_guid, a redeploy with no--app-idcallscontent_get("1234"). That call fails with a 404 and a "try--new" hint, but this path works onmaintoday. You could apply the same GUID check to IDs from the record for Connect, with an error that names--guidor--new. Or you could note this case in the CHANGELOG. Records like this might not exist in practice. -
The SPCS
--app-idbehavior changes, but the CHANGELOG and tests do not show it. Onmain, SPCS with--app-idfails with "Unable to infer Connect client." because theisinstancecheck invalidate_app_mode()does not includeSPCSConnectServer. This PR fixes that path. A CHANGELOG line and a test would make the fix visible.
Remove the legacy numeric content ID path (
app_get,get_content_by_id,ContentItemV0) and usecontent_getdirectly. An explicit--app-idfor a Connect target must be a content GUID.Add
--guidto the deploy commands andpreflightas the Connect-specific way to target existing content. It conflicts with--app-idand--new, and is rejected for Connect Cloud and shinyapps.io targets.Fixes #881
Fixes #885
🤖 Generated with Claude Code