GitHub user zyratlo created a discussion: Managing R support in main and 
deployments when the R runtime is installed separately

R UDFs run through texera-rudf, a package installed separately because it 
depends on rpy2 (GPLv2), which is not compatible with the Apache license (see 
#4155). The rest of R support still lives in main, and each piece is handled on 
its own. I ran into this while adding R to the notebook migration tool (#8009) 
and wanted to raise it.

### R in main today

* `RUDF` and `RUDFSource` operators, listed under an R group in the operator 
menu
* `r.path` in `udf.conf`, passed to Python workers as `R_HOME`
* R mode in the code editor
* An R UDF guide in the agent service prompt
* Example R UDFs in pytexera
* Soon, an R option in the migration tool (#8911, #8912)

### How each part offers or restricts R

Every part makes its own decision, and none of them knows whether texera-rudf 
is installed:

* **Operator menu:** always shows the R group.
* **Agent service:** adds the R UDF guide to an agent's system prompt unless 
that agent's allowed operator list is set and leaves out `RUDF`. An empty list 
means all operators, so by default every agent is taught to write R UDFs.
* **Code editor:** always opens R operators in R mode.
* **Migration tool:** will have its own flag, `rNotebookMigrationEnabled`, 
default off.
* **Execution:** the Python worker imports texera-rudf only when an R operator 
runs. If it is missing, the run fails with an install hint.

So a user can be offered R by the menu or the agent, build a whole workflow, 
and only learn at execution time that R is not available. None of our images 
install texera-rudf, so out of the box no deployment can run R.

### Questions

1. Should one R setting control all of this, hiding the operators, the agent 
guide and the migration option together?
2. Should it be a config flag, or detected from whether texera-rudf is 
installed?
3. Should there be an image option that installs R and texera-rudf?
4. How can we streamline managing these types of situations for active 
deployments?

GitHub link: https://github.com/apache/texera/discussions/8948

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to