Deployment of packaged plumber API to RSConnect

Dear community,

we have a packaged a plumber API by following the proposed method from this repo resulting from this discussion in the community forum.
The package structure is needed to be able to properly test the API's function. However, it does complicate deployment to RSConnect quite a bit with a CI/CD workflow.
For production usage, we depend on being able to properly test a package before releasing it.

Since the plumber API is a package now, RSConnect is not able to find the package's functions. It would also be possible to publish the package to our RSPM, but then we would have to adapt the manifest each and every time we want to release a new version to RSConnect. Also, a two-fold approach would be needed (which is not ideal):

  1. publish package to RSPM
  2. publish plumber API with package to RSConnect after updating manifest

Is there an easier solution to the problem?

Thanks in advance :slight_smile: !

Install your package from the plumber API? Haven't tested but it could maybe work.
Say you put package installation at the top of the plumber file?

1 Like

Thank you! That is a very good idea and workaround. It does indeed work but causes a noticeable delay when the API is started (no way around that as far as I can see). For now we have decided to use two repositories:

  1. A repository containing the API package that is deployed to our RSPM.
  2. A repository containing the plumber.R file that gets the package from the RSPM. The manifest of course has to be updated every time a new API package is released. This plumber file is then deployed to our RSConnect.

Not simple. Certainly room for improvement but it serves our needs for now :slight_smile: .