carloea2 opened a new pull request, #9279:
URL: https://github.com/apache/texera/pull/9279
### What changes were proposed in this PR?
Add typed UI parameters and model/dataset selections to R UDF and 1-out R
UDF, for both tuple and table APIs. Users declare parameters in R, edit their
values in the properties panel, and receive native R values at execution.
```r
count <- UiParameter("count", AttributeType$INT)$value
function(table, port) { head(table, count) }
```
Share the neutral parameter model, alias/resource manifest, metadata
validation, resource bindings, and contract fixtures with Python. Keep Python/R
syntax parsers and runtime adapters separate. The R compiler emits SDK v1
calls; native conversion and isolated operator state live in `texera-rudf`.
Resource selections resolve to mount directories at execution time. An old
installed plugin produces an explicit upgrade error.
Main-repository net LOC: +480 implementation/type data, +937 tests/fixtures,
+99 documentation. The Python parser is moved into its language adapter.
**Draft:** required before/after UI screenshots are pending; the local UI
requires sign-in. Automated UI and real runtime validation is complete.
### Any related issues, documentation, discussions?
Closes #9277.
Requires companion runtime PR: https://github.com/Texera/texera-rudf/pull/2
(prepared as `texera-rudf` 0.2.0, SDK v1; not yet published).
Architecture and ownership: [UI parameter
architecture](https://github.com/carloea2/texera/blob/feat/r-ui-parameters/docs/contribution-guidelines/ui-parameter-architecture.md).
### How was this PR tested?
- 438 frontend tests passed; one pre-existing skip.
- 132 Scala tests passed; 42 contract checks additionally passed in a
Turkish-locale test JVM.
- 211 Python/plugin/integration tests passed with actual R, rpy2, R Arrow,
and PyArrow. Covers all four R source/processing and tuple/table modes, exact
long values, Unicode/escaped text, booleans, timestamps, and resource files.
- Compile/Test scalafix and scalafmt checks, targeted frontend lint/format
checks, Python Ruff, and isolated Docker manifest-packaging smoke check passed.
A complete production image was not built.
<details>
<summary>Commands and local validation limits</summary>
Frontend, from `frontend/`:
```sh
node .yarn/releases/yarn-4.14.1.cjs test
--include='src/app/workspace/service/code-editor/*ui*parameters*.spec.ts'
--include='src/app/workspace/component/ui-udf-parameters/ui-udf-parameters.component.spec.ts'
--include='src/app/workspace/component/property-editor/operator-property-edit-frame/operator-property-edit-frame.component.spec.ts'
```
Scala task invocation from the repository root (the local Windows run used
Java 17 with `@.jvmopts` and `sbt-launch.jar`):
```sh
sbt 'set DAO / Test / sources := (DAO / Test /
sources).value.filterNot(_.getName == "UserWarehouseSpec.scala")' \
'WorkflowOperator/scalafix --check' 'WorkflowOperator/Test/scalafix
--check' \
'WorkflowOperator/scalafmtCheck' 'WorkflowOperator/Test/scalafmtCheck' \
'WorkflowOperator/testOnly *UiUdfParameterContractSpec *UiUDFParameterSpec
*PythonUdfUiParameter*Spec *RUdfUiParameterInjectorSpec *RUDFOpDescSpec
*RUDFSourceOpDescSpec *PythonUDFOpDescV2Spec
*DualInputPortsPythonUDFOpDescV2Spec *PythonUDFSourceOpDescV2Spec' \
'WorkflowOperator/Test/runMain
org.apache.texera.amber.operator.udf.UiParameterIntegrationFixtures
common/workflow-operator/target/ui-parameter-fixtures.json'
```
The local database is behind the DAO schema, so the unrelated
`UserWarehouseSpec.scala` was excluded from DAO test-source compilation for
this targeted run. No build configuration was changed. For locale checks, the
contract suite was rerun with `WorkflowOperator / Test / fork := true` and JVM
options `-Duser.language=tr -Duser.country=TR`.
Actual R integration invocation in the prepared Linux container (Python
3.12, R 4.5.3, R Arrow 25.0.1, PyArrow 23.0.1, and the companion plugin
installed):
```sh
docker exec texera-r-ui-integration sh -lc 'export
PATH=/tmp/r-ui-env/bin:$PATH LD_LIBRARY_PATH=/tmp/r-ui-env/lib
TEXERA_R_INTEGRATION=1; cd /workspace/amber; python -m pytest
src/test/python/core/architecture/managers/test_executor_manager.py
src/test/python/pytexera/udf/test_udf_operator.py
src/test/python/pytexera/udf/test_ui_parameter_contract.py
/tmp/texera-rudf/tests -q'
```
`TEXERA_R_INTEGRATION=1` fails explicitly if the actual plugin or compiler
fixtures are missing. These are targeted suites, not a full repository run.
</details>
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: OpenAI Codex 0.166.0-alpha.5.1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]