rsconnect-python icon indicating copy to clipboard operation
rsconnect-python copied to clipboard

Use `v1/bootstrap` if Connect version supports it

Open nealrichardson opened this issue 1 year ago • 3 comments

As this endpoint comes out of experimental, we should switch to the new endpoint depending on the version of the Connect server we're talking to.

nealrichardson avatar May 22 '24 14:05 nealrichardson

The 2024.05.0 release includes POST /__api__/v1/bootstrap. The POST /__api__/v1/experimental/boostrap endpoint is deprecated and scheduled for removal with 2024.12.0.

rsconnect-python should start using the /v1/ API for Connect 2024.05.0 and newer, using the /v1/experimental/ API for older versions until they pass beyond the support horizon (18mos from 2024.04.0).

aronatkins avatar Jun 06 '24 20:06 aronatkins

A challenge for this particular endpoint: the internal server_settings API is used to obtain the Connect version, but server version is not provided to unauthenticated requests.

aronatkins avatar Jun 06 '24 20:06 aronatkins

Hmm, then do we have to

try:
    POST /__api__/v1/bootstrap
except:
    POST /__api__/v1/experimental/bootstrap

nealrichardson avatar Jun 06 '24 20:06 nealrichardson