Repository navigation
Description
Feature Summary
A Python UDF declares its parameters in its code (self.UiParameter(name, type)), and whoever runs the workflow fills them in from the property panel, or on the Form View from the form. Today every parameter is a free-text box, whatever the value means, except one that names a dataset or a model, which opens a picker that stops at the version.
Two problems follow:
- A file has to be spelled out by hand. A dataset is a versioned container holding a file tree. The picker stops at the version, so the person running the workflow types the rest of the path exactly right, although Texera lists every file a click away elsewhere. And what the UDF receives is a mounted folder path, which only exists on a Kubernetes computing unit: a workflow written this way fails on a local one.
- Nothing says what a box accepts. A parameter that takes one of three methods looks like a parameter that takes any text; a wrong value surfaces when the UDF runs, if at all. The author can only say what is expected in words (the input's help text, the form's instructions).
The feature: a parameter says what it accepts in the same call that already gives it a name and a type. One that lists its values gets a dropdown; one that names a dataset gets the browser Texera already has, down to a file; one that says nothing is unchanged. Discussed in #9338 (general support from @mengw15; the three small main bugs found while building it are separate: #9501 / #9526, #9502 / #9527, #9500).
Proposed Solution or Design
1. A parameter can list its values
# today
self.method = self.UiParameter("method", AttributeType.STRING).value
# proposed
self.method = self.UiParameter("method", AttributeType.STRING, choices=["soupx", "decontx"]).valueIt renders as a dropdown of those values, on the panel and on the form. A value already filled in survives a change to the list, unless the new list no longer offers it. choices takes a literal list only.
2. A parameter that names a dataset can be picked down to a file
self.input_file = self.UiParameter("input_file", AttributeType.STRING, value=Resource.DATASET).valuevalue=Resource.DATASET already exists on main (#6897); it keeps being the one way to point a parameter at a dataset (the Resource.DATASET_FILE spelling floated in the discussion is folded into it). What changes:
- The picker reaches a file. The dataset browser opens in file mode with the version still selectable, so the person filling the form picks the version and then the file, or stops at the version for a UDF that reads several files out of it. The picked row is highlighted (fix(frontend): highlight the file picked in the dataset file tree #9526) and the browser is confirmed only once something is picked.
- What the UDF receives can be read on any deployment. The parameter's value is the dataset's own path (
/<owner>/<dataset>/<version>/<file>), not a mounted folder; pytexera reads it through the dataset API, which every deployment has, so the same workflow runs on a local computing unit and on Kubernetes. A dataset parameter no longer asks for a mount, so a UDF with only dataset parameters needs no execution binding at all.value=Resource.MODELis unchanged (version only, mounted, as today).
3. The declaration comes from the code
The frontend already reads each parameter's name and type out of the UDF source; what it accepts comes from the same place, re-read whenever the workflow is opened, so it stays in step with the code and a workflow built by a script or imported from a file shows its controls too. The copy stored with the workflow (uiParameters) is a cache.
The declaration drives the UI only: the backend does not reject a value outside the declared set, since the stored set can be older than the code, and rejecting a value would tell an author their own code is wrong.
Affected Area
Workflow UI, Workflow Engine (Amber)
Activity
github-actions commentedon Nov 23, 2026
👋 Thanks for opening this issue, @yangzhang75!
It looks like the issue description doesn't quite follow our template yet:
Filling out the template helps reviewers understand and triage your contribution faster. Please edit the description to complete it. This message will disappear automatically once the template is followed.
You can find the template prompts by editing the description, or see CONTRIBUTING.md for the full contribution flow.
yangzhang75 commentedon Nov 23, 2026
/take