rstudio / rsconnect

Publish Shiny Applications, RMarkdown Documents, Jupyter Notebooks, Plumber APIs, and more
http://rstudio.github.io/rsconnect/
129 stars 79 forks source link

Republishing to RPubs is broken from RStudio #1016

Closed jcheng5 closed 9 months ago

jcheng5 commented 9 months ago

Fixes #976. See https://github.com/rstudio/rsconnect/issues/976#issuecomment-1760090198 for explanation.

aronatkins commented 9 months ago

Thanks, @jcheng5! I'll take it from here, fix the lint complaints and add NEWS.

aronatkins commented 9 months ago

I've confirmed that rpubs republishing is fixed with this change.

Unfortunately, the off-by-one deployment record means that existing documents are "stuck".

Folks can either use rsconnect::forgetDeployment() or manually adjust the rsconnect deployment record.

Assuming I'm publishing from an index.Rmd file, the deployment record lives at: rsconnect/documents/index.Rmd/rpubs.com/rpubs/Document.dcf

An example "bad" record:

name: Document
title:
username:
account: rpubs
server: rpubs.com
envVars: rpubs.com
hostUrl: https://api.rpubs.com/api/v1/document/1097969/984f9439141d43f4a35ae663a972522e
appId: https://api.rpubs.com/api/v1/document/1097969/984f9439141d43f4a35ae663a972522e
bundleId: http://rpubs.com/publish/claim/1097969/4ef82fe6cb3f41f39e42de23caf3e806
url: 1697138036.07503
version: 1

An example "good" record:

name: Document
title:
username:
account: rpubs
server: rpubs.com
hostUrl: rpubs.com
appId: https://api.rpubs.com/api/v1/document/1097975/bf849d4b51884d1a9716e7028e5b33a6
bundleId: https://api.rpubs.com/api/v1/document/1097975/bf849d4b51884d1a9716e7028e5b33a6
url: http://rpubs.com/publish/claim/1097975/e57795f1581b4f30a16c353b4ae7c911
version: 1

There were two mistakes:

  1. an envVars argument was not added
  2. the when and lastSyncTime arguments were removed.
jcheng5 commented 9 months ago

Thanks @aronatkins!

JBell39 commented 8 months ago

I don't know what I am doing wrong. Here is my updated dcf:

name: Document
title:
username:
account: rpubs
server: rpubs.com
hostUrl: rpubs.com
appId: https://api.rpubs.com/api/v1/document/1099849/f24f13c92bd4430a8e6d83d25154f1fc
bundleId: http://rpubs.com/publish/claim/1099849/37d672b76e4748539e6d5983395371e5
url:  https://rpubs.com/bellj39/1099849
version: 1
JBell39 commented 8 months ago

I don't know what I am doing wrong. Here is my updated dcf:

name: Document
title:
username:
account: rpubs
server: rpubs.com
hostUrl: rpubs.com
appId: https://api.rpubs.com/api/v1/document/1099849/f24f13c92bd4430a8e6d83d25154f1fc
bundleId: http://rpubs.com/publish/claim/1099849/37d672b76e4748539e6d5983395371e5
url:  https://rpubs.com/bellj39/1099849
version: 1

NM! I friggin' figured it out. lol. Thank you!