Skip to content

Reconstruct migration record from contentId when no local record exists - #1358

Open
vrsarah wants to merge 3 commits into
mainfrom
migrate-optional-source-record
Open

Reconstruct migration record from contentId when no local record exists#1358
vrsarah wants to merge 3 commits into
mainfrom
migrate-optional-source-record

Conversation

@vrsarah

@vrsarah vrsarah commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #1353. Closes https://github.com/rstudio/lucid-server/issues/5706

For users whose local record is gone, the merged version had no recovery path - this closes that gap without requiring the shinyapps source bundle or appId. When no source record is found:

  • The Connect Cloud record is reconstructed from contentId alone (which getContent() already verifies exists).
  • The record name comes from appName, or is derived from the content's title via generateAppName() when appName is omitted - Connect Cloud content has no server-side name to reuse, only a title.
  • The source-removal step is skipped (there is nothing to remove).

Testing

  1. Run migrateToConnectCloud(appDir, contentId) from a working directory where there is no deployment record.
  2. It should create a Connect Cloud record from contentId.
  3. deployApp(appDir) should send deployments to connect.posit.cloud.

…d exists

migrateToConnectCloud() previously aborted when the app directory had no
deployment record on disk, leaving no path for users who have lost their
rsconnect/ directory (e.g. content deployed long ago on a machine they no
longer have).

Make the source deployment record optional: when none is found, build the
Connect Cloud record from contentId alone -- the record name comes from
appName, or is derived from the content title via generateAppName() -- and
skip the source-removal step. The has-record path is unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant