connectapi
connectapi copied to clipboard
Handle redirects
We recently hit redirect issues where connectapi
would just hang on redirects. We should handle redirects more nicely
@jspiewak
Do you have a reproducer? IIRC there is a curl option to follow redirects, but it thought it was default to on.
It was likely a piece of content that was explicitly pointed at connect.rstudioservices.com that didn't gracefully handle when we migrated to connect.posit.it and put a redirect in place. But maybe Cole recalls more specifics.
An rsconnect issue from the same time (host rename): https://github.com/rstudio/rsconnect/issues/760
One problem we observed is that the initial request received a redirect response but the client didn't recognize that its payload needed to be resent.
This comment talks about what we saw for colorado: https://github.com/rstudio/rsconnect/pull/754#discussion_r1131878399
Yeah, I believe this was related to these pins
requests. I did them at the same time, at least 😅
https://github.com/rstudio/pins-r/issues/760 https://github.com/rstudio/pins-r/issues/759
The problem for this post was a few scheduled reports on Connect that were not handling redirects. As a result, they just blocked and filled the job queue so nothing else on the server could run. I'll DM the reports in question.
You're right though - a rudimentary check just now showed connectapi
respecting redirects
One problem we observed is that the initial request received a redirect response but the client didn't recognize that its payload needed to be resent.
That sounds like https://curl.se/libcurl/c/CURLOPT_POSTREDIR.html