Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to publish collaboratively #981

Closed
ischmidt20 opened this issue Aug 28, 2023 · 3 comments · Fixed by #1021
Closed

Unable to publish collaboratively #981

ischmidt20 opened this issue Aug 28, 2023 · 3 comments · Fixed by #1021
Assignees

Comments

@ischmidt20
Copy link

I would like to have multiple different people publish the same Shiny app to the same endpoint on Posit Connect. I have followed the guidelines here precisely, yet every time someone other than the original publisher tries to publish, a new app is created.

In our repo, the .dcf file is located in rsconnect/[posit url]/[username]/ShellApp,dcf.

When the second user attempts to publish, this location is available as an option in the dropdown, and the resulting window looks as it should based on the video: "publish from" contains the second user's username, "publish to account" shows the original user.

However, upon publishing, a new app is created. Note that the original app has id 67.

i Creating application on server...
v Created application with id 78

I have tried moving the .dcf file to different locations, first outside of the username directory and then outside of the posit URL directory as well. Neither worked. I have also tried removing the account and username rows from the file, as discussed here. That also fails.

The only thing that "works" is a manual call to deployApp with the appId argument specified. This then creates a new dcf file at rsconnect/[posit url]/[second username]/ShellApp,dcf and all future deployments from the second user work. However, this is not ideal considering that manually calling deployApp requires specifying all of the other arguments that would normally be contained in the dcf (e.g. which files to include/exclude).

Clearly, rsconnect is either not reading or not using the appId value when reading a .dcf from another user. I haven't tested whether other settings fail to transfer over as well.

I am using the latest version of rsconnect on CRAN

@ischmidt20
Copy link
Author

OK, I think I've developed a workaround, similar to what I described above, but is still not ideal.

Second user pulls repo with latest copy of settings .dcf file from the first user.

Second user manually deploys app via rsconnect::deployApp and manually specifies appId (can be obtained from .dcf file or from browsing server itself).

This generates a new .dcf file for second user. Second user can then copy any additional settings from first user's .dcf file into the new .dcf file, such as excluded files.

Quit Rstudio and restart. (Not 100% sure that this is necessary).

Second user re-deploys from dropdown menu using the selection associated with his/her account. Thereafter, all deployments from second user (and first user) should work as expected. If either user changes a setting, probably the other user needs to repeat the above steps.

Haven't tested this completely to be 100% sure that it works yet, but it seems to be doing the job so far.

Of course, it would be better if the steps described on the tutorial page worked as expected and this workaround was not necessary.

@aronatkins aronatkins assigned hadley and aronatkins and unassigned hadley Oct 4, 2023
@aronatkins aronatkins linked a pull request Oct 25, 2023 that will close this issue
@aronatkins
Copy link
Contributor

Would you mind testing the development version of rsconnect to confirm that we have resolved this problem?

remotes::install_github("rstudio/rsconnect")

@ischmidt20
Copy link
Author

Yes, I think this worked! My app already had the two .dcf files as mentioned in the issue, so I tested by deleting "my" .dcf file and restarting the R session. Thus the only deployment configuration recognized was from the original deployer (not me). I deployed via selecting the other user's deployment from the dropdown menu. The app deployed to the same location (same appId and URL), and no new .dcf file was created.

Thank you for the fix! (and apologies for the delay in confirmation)

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 a pull request may close this issue.

3 participants