Closed dewoller closed 2 years ago
The second write fails when it attempts a http PATCH operation, while the first succeeds using a standard POST.
In the environment I have access to (Connect v2021.09.0) this works fine for me.
I'm using pins 1.0.0 with R 4.1.0
I've declared a specific name
because there are already "multiple pins with name 'iris'", so I chose something else, but otherwise this is the same as the code you provided.
library(pins)
rsconnect_board = board_rsconnect( auth="envvar" )
#> Connecting to RSC 2021.09.0 at <https://connect.example.com/rsc>
rsconnect_board %>% pin_write(iris, name = "pins_issue")
#> Guessing `type = 'rds'`
#> Writing to pin 'mark.sellors/pins_issue'
rsconnect_board %>% pin_write(iris, name = "pins_issue")
#> Guessing `type = 'rds'`
#> Writing to pin 'mark.sellors/pins_issue'
Created on 2021-11-03 by the reprex package (v2.0.1)
Similarly, the pin_delete()
worked in my case.
It would be worth looking at your Connect instance to ensure that it's up-to-date and that there's nothing in the connect infrastructure environment that might be causing issues. Reverse proxies and things like that for instance.
Thanks @sellorm, your comment about proxies was the clue I needed to solve the issue.
The problem was due to a setting in the Azure gateway web application firewall that exists in front of the Rstudio-rsconnect server. The setting that blocked the PATCH request was REQUEST-911-METHOD-ENFORCEMENT, specifically RuleId 911100, Method is not allowed by policy. This rule blocks all PUT and PATCH requests, and disabling this rule allows pin updating. Woowee!
Glad you figured it out! 🎉
I'm going to close this issue, but it'll still be accessible via search so any one else suffering the same problem is likely to find it.
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.
Hi All. Love your work! Pins make so many things better. And I would love to use qs as my pin storage format, hence testing out the bleeding edge version of the code. Unfortunately, it doesn't work. The board connects and authenticates, and I can even write a pin. Once. The second time, it errors out.
If I delete the pin first, then I can write, albeit with a warning:
The second run of the code returns the following warning from the pin_delete:
If I include my full name in the name parameter (which I want), e.g.
pin_delete( rsconnect_board, "dennis.wollersheim@XXXX/iris")
I get the following error at the pin_delete callError: RStudio Connect API failed [404]