rstudio / rsconnect

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

showLogs does not seem to take the "server" paramater #57

Closed fereshtehRS closed 2 years ago

fereshtehRS commented 9 years ago

I have multiple servers and accounts in my environment.

If I run the following, get an error about "server":

> rsconnect::showLogs(account="fereshteh")
Error: Multiple accounts with the name 'fereshteh' exist. Please specify the server of the account you wish to use.

And if I specify the server, I still get the same error:

rsconnect::showLogs(server="shinyapps.io", account="fereshteh")
Error: Multiple accounts with the name 'fereshteh' exist. Please specify the server of the account you wish to use.
jjallaire commented 9 years ago

I'm thinking that since this function is shinyapps only that it shouldn't even have the "server" parameter (it should be hard coded to "shinyapps.io"). However, I have a lingering feeling that Jonathan added support for showLogs to Connect a while back. @jmcphers Is that correct or should we wall this off to shinyapps?

jjallaire commented 9 years ago

@kippandrew

aronatkins commented 9 years ago

We expose log information for recent tasks (here via the listTasks function) but I don't see any showLogs for connect.

jmcphers commented 9 years ago

No, I only implemented showLogs for shinyapps.io--we can remove the parameter for now (with the understanding that viewing live logs is a feature we'll probably want to add to Connect at some point, at which time we can add it back)

fereshtehRS commented 9 years ago

An update and FYI on this issue:

the server parameter is now removed from both rsconnect and shinyapps. And this is how it currectly behaves:

> shinyapps::showLogs()
Error: Multiple accounts with the name 'fereshteh' exist. Please specify the server of the account you wish to use.
> shinyapps::showLogs(server="shinyapps.io")
Error in shinyapps::showLogs(server = "shinyapps.io") : 
  unused argument (server = "shinyapps.io")
fereshtehRS commented 8 years ago

I like to request a fix for his issue. showLogs does not work in my environment since I always have multiple servers/accounts/.

bhogan-mitre commented 2 years ago

I ran into the same issue. If the use case is for shinyapps.io only and not RStudioConnect, it seems like this should still support users that have multiple accounts. Or if that is not possible, it would be nice to fail with a more obvious message to the user.

Right now I am getting a message from rsconnect::showLogs stating to specify the server. That message is coming from rsconnect:::deploymentTarget, but server is not a parameter in showLogs.

aronatkins commented 2 years ago

@bhogan-mitre - would you mind giving this a try:

remotes::install_github("rstudio/rsconnect", ref="aron-show-logs-57")

I've made the change in #583 to try to address your issue, but I do not have the same configuration, myself.

bhogan-mitre commented 2 years ago

Thanks for that update @aronatkins. I see that there is now a server parameter to the show_logs function. Although I get a 401 error from api.shinyapps.io, which is not one of the servers that I have an account for. To clarify, I have accounts on multiple RStudio Connect instances, but no account on shinyapps.io.

Is rsconnect::showLogs intended to be only for shinyapps.io? In taking a closer look at the documentation it seems that is the case for other functions in the same category as well. https://rstudio.github.io/rsconnect/reference/index.html#section-properties-and-metrics

Are there plans to support using those functions for RStudio Connect as well?

aronatkins commented 2 years ago

Ah! showLogs is definitely only for ShinyApps.io. Sorry that we missed that you were trying to use it with Connect.

We are actively working towards having public APIs for Connect that allow logs visibility. Those APIs should show up soon. I don't know of any plans to use those APIs in rsconnect, yet.

My PR improves showLogs for folks who use multiple ShinyApps.io accounts. We'll continue testing/validation on our end without waiting for further input, @bhogan-mitre.

bhogan-mitre commented 2 years ago

Thanks for clarifying! Are there open issues you recommend paying attention to for progress on APIs with Connect?

aronatkins commented 2 years ago

@bhogan-mitre - We don't have a public roadmap for RStudio Connect, but I've asked that the folks working on the logging APIs to reach out to you once their work has completed. They've got a reference to this issue and to you. I'll figure out who's your representative within RStudio and have them track this work, as well.

The issues tracked here are generally related only to the rsconnect R package.