rstudio / pins-r

Pin, discover, and share resources
https://pins.rstudio.com
Other
312 stars 63 forks source link

Investigate requiring username for Connect board #636

Closed juliasilge closed 2 years ago

juliasilge commented 2 years ago

On Connect boards, there is some guessing that happens when you write a pin:

library(pins)
b <- board_rsconnect()
#> Connecting to RSC 2022.07.0 at <https://colorado.rstudio.com/rsc>
pin_write(b, mtcars, "mtcars-again")
#> Guessing `type = 'rds'`
#> Writing to pin 'julia.silge/mtcars-again'

Created on 2022-08-16 by the reprex package (v2.0.1)

You cannot currently write a fully specified pin name including owner:

library(pins)
b <- board_rsconnect()
#> Connecting to RSC 2022.07.0 at <https://colorado.rstudio.com/rsc>
pin_write(b, mtcars, "julia.silge/mtcars")
#> Guessing `type = 'rds'`
#> Writing to pin 'julia.silge/julia.silge/mtcars'

Created on 2022-08-16 by the reprex package (v2.0.1)

If you try to write a pin with a name that already exists on the board under another username, we get a not-so-helpful error:

library(pins)
b <- board_rsconnect()
#> Connecting to RSC 2022.07.0 at <https://colorado.rstudio.com/rsc>
pin_write(b, mtcars, "mtcars3")
#> Guessing `type = 'rds'`
#> Error in `rsc_check_status()` at pins-r/R/board_rsconnect.R:645:2:
#> ! RStudio Connect API failed [403]
#> • You don't have permission to change this item.

Created on 2022-08-16 by the reprex package (v2.0.1)

The Python package requires a "fully specified" name including the username. Let's look into:

Related to #613

juliasilge commented 2 years ago

I believe we got around the current problems with usernames in #643 and do not need to require the username on Connect at this time. Let's keep it in mind moving forward if more problem come up or this is too hard to maintain.

github-actions[bot] commented 2 years ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.