Skip to content

feat(LakeFS-mount): name a model or dataset from a Python UDF parameter - #6897

Merged
aicam merged 11 commits into
apache:mainfrom
aicam:feat/mount-B2-udf
Sep 21, 2026
Merged

aicam merged 11 commits into
apache:mainfrom
aicam:feat/mount-B2-udf

Conversation

@aicam

@aicam aicam commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Lets a Python UDF name a model or dataset version as a parameter and read it from a local directory. This is the last step of mounting (#6606).

self.model_dir = self.UiParameter("MODEL", AttributeType.STRING, value=Resource.MODEL).value
  • pytexera gains Resource (MODEL, DATASET), accepted as value= on string parameters only.
  • The editor recognizes that declaration, and the parameter row offers a model or dataset browser instead of a text box. The chosen version is stored as its path. The model browser is new.
  • Resolution happens when the execution starts, not on compile: the operator carries an execution-time binding that resolves each version path to its repository and commit, then gives the UDF the mount directory in the path's place.
  • The region scheduler collects the distinct repositories its operators name and mounts them once, before any worker gets its code. A reconfiguration mounts the same way.
  • The engine asks access-control-service for each mount with the computing unit's own JWT, and feat(LakeFS-mount): authorize and perform a repository mount #6896 authorizes the request. The engine then waits for the mount to appear in the pod. The manager passes the service's address to the pod, taken from the chart.

The request carries the identity of the computing unit's owner. A WRITE sharee can therefore mount only what the owner can also read; a version only the sharee can read is refused with 403.

Any related issues, documentation, discussions?

Closes #6895. Part of #6606. Follows #6866 and #6896, both merged.

How was this PR tested?

  • Frontend unit tests: the parser, parameter sync, the resource value editor, the model browser, and the model service.
  • pytexera unit tests: Resource declarations.
  • Scala unit tests:
    • The binding: a dataset and a model resolved against a test database, and a missing version refused.
    • The UDF descriptors.
    • The region scheduler: it mounts before initializing workers, fails the region before any worker starts when a mount is refused, and does not mount when nothing is named.
    • Reconfiguration.
  • End to end on minikube: a source UDF with a dataset parameter and a model parameter, both picked in the property panel. The run mounted both through access-control-service and the node mounter, and the UDF read a file from each directory.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Opus 5

🤖 Generated with Claude Code

https://claude.ai/code/session_01KCY3USGKcgmf8CbN44trJ5

@github-actions

github-actions Bot commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Committers with relevant context: @parshimers
    You can request their reviews formally with /request-review @parshimers.

  • Contributors with relevant context: @carloea2, @aglinxinyuan, @tanishqgandhi1908
    You can notify them by mentioning @carloea2, @aglinxinyuan, @tanishqgandhi1908 in a comment.

@codecov-commenter

codecov-commenter commented Jul 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.86207% with 77 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.75%. Comparing base (279e12b) to head (4ffefc8).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...ra/amber/core/storage/RepositoryMountManager.scala 49.27% 27 Missing and 8 partials ⚠️
...pache/texera/amber/core/storage/FileResolver.scala 76.66% 1 Missing and 6 partials ⚠️
...texera/service/util/ComputingUnitNodeLocator.scala 40.00% 6 Missing ⚠️
...ue-selector/resource-value-selector.component.html 0.00% 6 Missing ⚠️
...alue-selector/resource-value-selector.component.ts 75.00% 2 Missing and 4 partials ⚠️
.../apache/texera/service/util/KubernetesClient.scala 66.66% 5 Missing ⚠️
...rator/udf/python/PythonUdfUiParameterSupport.scala 86.95% 0 Missing and 3 partials ⚠️
...lection-modal/model-selection-modal.component.html 88.00% 2 Missing and 1 partial ⚠️
...selection-modal/model-selection-modal.component.ts 93.02% 0 Missing and 3 partials ⚠️
...t/ui-udf-parameters/ui-udf-parameters.component.ts 86.95% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6897      +/-   ##
============================================
- Coverage     92.80%   92.75%   -0.05%     
- Complexity     4898     4925      +27     
============================================
  Files          1239     1244       +5     
  Lines         52252    52523     +271     
  Branches       6425     6473      +48     
============================================
+ Hits          48492    48718     +226     
- Misses         2183     2200      +17     
- Partials       1577     1605      +28     
Flag Coverage Δ *Carryforward flag
access-control-service 77.38% <40.00%> (+5.59%) ⬆️
agent-service 99.16% <ø> (ø) Carriedforward from e7e67d9
amber 88.45% <68.08%> (-0.15%) ⬇️
computing-unit-managing-service 55.24% <66.66%> (+0.04%) ⬆️
config-service 87.37% <ø> (ø)
file-service 81.53% <ø> (ø)
frontend 96.56% <85.21%> (-0.08%) ⬇️
notebook-migration-service 83.73% <ø> (ø)
pyamber 98.48% <100.00%> (+<0.01%) ⬆️
workflow-compiling-service 74.09% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

🟢 6 better · 🔴 3 worse · ⚪ 6 noise (<±5%) · 0 without baseline

Compared against main 279e12b benchmarked on this same runner, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency max Δ latest / 7d
🔴 bs=10 sw=10 sl=64 665 0.406 14,911/18,155/18,155 us 🔴 +13.9% / 🔴 +17.3%
🟢 bs=100 sw=10 sl=64 1,568 0.957 61,644/72,475/72,475 us 🟢 -47.4% / 🟢 +58.0%
⚪ bs=1000 sw=10 sl=64 1,931 1.178 512,330/631,960/631,960 us ⚪ within ±5% / 🟢 +88.8%
Baseline details

Latest main 279e12b from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 665 tuples/sec 710 tuples/sec 775.4 tuples/sec -6.3% -14.2%
bs=10 sw=10 sl=64 MB/s 0.406 MB/s 0.433 MB/s 0.473 MB/s -6.2% -14.2%
bs=10 sw=10 sl=64 p50 14,911 us 13,087 us 12,716 us +13.9% +17.3%
bs=10 sw=10 sl=64 p95 18,155 us 19,866 us 15,572 us -8.6% +16.6%
bs=10 sw=10 sl=64 p99 18,155 us 19,866 us 19,527 us -8.6% -7.0%
bs=100 sw=10 sl=64 throughput 1,568 tuples/sec 1,478 tuples/sec 992.44 tuples/sec +6.1% +58.0%
bs=100 sw=10 sl=64 MB/s 0.957 MB/s 0.902 MB/s 0.606 MB/s +6.1% +58.0%
bs=100 sw=10 sl=64 p50 61,644 us 64,249 us 102,140 us -4.1% -39.6%
bs=100 sw=10 sl=64 p95 72,475 us 137,733 us 108,282 us -47.4% -33.1%
bs=100 sw=10 sl=64 p99 72,475 us 137,733 us 118,936 us -47.4% -39.1%
bs=1000 sw=10 sl=64 throughput 1,931 tuples/sec 1,905 tuples/sec 1,023 tuples/sec +1.4% +88.8%
bs=1000 sw=10 sl=64 MB/s 1.178 MB/s 1.163 MB/s 0.624 MB/s +1.3% +88.7%
bs=1000 sw=10 sl=64 p50 512,330 us 517,392 us 998,263 us -1.0% -48.7%
bs=1000 sw=10 sl=64 p95 631,960 us 606,314 us 1,036,365 us +4.2% -39.0%
bs=1000 sw=10 sl=64 p99 631,960 us 606,314 us 1,064,941 us +4.2% -40.7%
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,300.68,200,128000,665,0.406,14911.32,18155.18,18155.18
1,100,10,64,20,1275.44,2000,1280000,1568,0.957,61643.83,72475.11,72475.11
2,1000,10,64,20,10358.99,20000,12800000,1931,1.178,512330.20,631959.57,631959.57

@chenlica

Copy link
Copy Markdown
Contributor

@aicam Please make the PR description more readable. Also this PR changed 44 files. Can we divide it?

@aicam aicam closed this Jul 27, 2026
@aicam aicam reopened this Jul 27, 2026
@aicam

aicam commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

@aicam Please make the PR description more readable. Also this PR changed 44 files. Can we divide it?

Its because its a PR part of a PR series:

  1. feat(computing-unit): out-of-pod LakeFS repository mount infrastructure #6866 — out-of-pod dataset mount infrastructure → feat(computing-unit): out-of-pod LakeFS repository mount infrastructure #6866
  2. feat(LakeFS-mount): authorize and perform a repository mount #6896 — per-computing-unit dataset mounting → feat(LakeFS-mount): authorize and perform a repository mount #6896
  3. feat(LakeFS-mount): name a model or dataset from a Python UDF parameter #6897 — use mounted datasets in Python UDFs → feat(LakeFS-mount): name a model or dataset from a Python UDF parameter #6897

When the preceding PR get merged, number of line changes update.

@aicam
aicam marked this pull request as draft August 3, 2026 16:44
@aicam
aicam force-pushed the feat/mount-B2-udf branch 3 times, most recently from b732162 to 15beb09 Compare August 17, 2026 20:47
@github-actions github-actions Bot added the dependencies Pull requests that update a dependency file label Sep 11, 2026
@aicam aicam changed the title feat(dataset-mount): use mounted datasets in Python UDFs feat(dataset-mount): name a model or dataset from a Python UDF parameter Sep 11, 2026
@aicam aicam changed the title feat(dataset-mount): name a model or dataset from a Python UDF parameter feat(LakeFS-mount): name a model or dataset from a Python UDF parameter Sep 12, 2026
@aicam
aicam requested a review from parshimers September 18, 2026 19:27
@parshimers

Copy link
Copy Markdown
Member

if you want to defer some of these comments that's fine by me since this is gated by the feature flag and these things are in a similar vein to some of the other ones that motivated doing that. i think we need to think about them eventually though.

aicam and others added 9 commits September 21, 2026 10:13
…lient

The hand-rolled in-cluster REST call, with its own CA loading and TLS
setup, is replaced by fabric8's client, which computing-unit-managing-
service already depends on for the same lookup.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Fy9tJ1AB4trv6ZYGwfm9pR
A Python UDF declares a parameter whose value is a resource rather than
free text:

    model_dir = self.UiParameter("MODEL", AttributeType.STRING, value=Resource.MODEL).value

The property panel offers that resource's browser instead of a text box,
the user picks a version, and the UDF receives the local directory that
version is mounted at. There is no separate mount action anywhere.

Resolving a version path to its repository and commit is a database round
trip, and the directory only exists inside the computing unit that runs
the operator, so neither happens while compiling. The operator carries an
execution-time binding instead; the region scheduler gathers the
repositories its operators name, asks access-control-service to mount
them with the unit's own user token, waits for them to appear, and only
then hands out code with the mount paths in place. A paused-and-edited
UDF is re-sent with its bound code too.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_014cfuUwJC8upJdPDci8b5fa
…thority

A refused mount fails the region before any executor is initialized;
a comment still claimed read access is only checked where bytes are
served, and a spec file was not prettier-formatted.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01KCY3USGKcgmf8CbN44trJ5
The path computing-unit pods see their mounts at was hardcoded in both
the manager and the engine; it is now a chart value passed through the
manager to each pod, with no default in code.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_017NQX5EePiMo4vqSWzLDVBB
…art passes

The mount root no longer has a default, so forcing a UDF's binding outside
a computing unit failed. The descriptor takes its mount manager from an
overridable method, and the spec supplies one built with the chart's root.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TjZGBJDNL98ggngAoS3Y4X
…nges

Formly keeps a row's config when the parameters are rebuilt from the code
and re-renders a cell only for a new config, so a row that gained or lost
value=Resource.X kept its old editor. Such a row is now rebuilt from the
template.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Fy9tJ1AB4trv6ZYGwfm9pR
Formly still has the whole operator's properties in `model` when the rows
are read before the base class populates, so every row looked like free
text and lost its resource browser.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Fy9tJ1AB4trv6ZYGwfm9pR
@aicam

aicam commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

if you want to defer some of these comments that's fine by me since this is gated by the feature flag and these things are in a similar vein to some of the other ones that motivated doing that. i think we need to think about them eventually though.

I think the only deferred topic is custom token for mounting (avoid using user JWT for mounting). We may address it later.

@aicam
aicam enabled auto-merge September 21, 2026 18:57
…K backend

The license audit blocked on the jars fabric8 brings in. They are declared
now, and the client uses the JDK HTTP backend instead of okhttp, which
drops three jars and okhttp 3.x, which is end of life.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Fy9tJ1AB4trv6ZYGwfm9pR
@aicam
aicam added this pull request to the merge queue Sep 21, 2026
Merged via the queue into apache:main with commit 60a37b1 Sep 21, 2026
37 checks passed
@aicam
aicam deleted the feat/mount-B2-udf branch September 21, 2026 21:54
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Nov 16, 2026
…pache#8832)

### What changes were proposed in this PR?

A dead GeeseFS mount stays in `/proc/mounts` and can still answer
`stat()` from cached attributes, but every read fails with `Transport
endpoint is not connected`. `RepositoryMountManager.isFuseMounted` and
the mounter's `_responds` both counted it as live. So the unit never
re-requested the mount, and the operator got an unreadable directory
until the unit was recreated.

Both checks now require the mount's directory to be listable. The next
run then re-requests the mount, and `do_mount` replaces it.

### Any related issues, documentation, discussions?

Follow-up to apache#6866 and apache#6897 (part of apache#6606).

### How was this PR tested?

- New tests in `RepositoryMountManagerSpec` and `test_mounter.py`. The
mounter's dead-mount test (stats fine, listing fails with `ENOTCONN`)
fails on the old check.
- Checked both rules against real dead mounts on a live cluster: inside
the pod, `stat()` succeeded and listing failed.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5.5)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Nov 25, 2026
…9644)

### What changes were proposed in this PR?

Remove unused and inert SCSS rules, an empty component stylesheet,
unread callback and lifecycle parameters, and a duplicate module import
across the Angular frontend (**+13/-134 lines**). There is no observable
UI or runtime behavior change.

- **Detail-page SCSS selectors:** Remove unmatched `.file-title`,
`.file-size`, `.versions-tab-content`, `nz-layout`, `html, body`,
`.grayed-out`, `.disabled-click`, and `.ant-collapse-content-box` rules
from `DatasetDetailComponent` SCSS, and unmatched
`.versions-tab-content` and `nz-layout` rules from
`ModelDetailComponent` SCSS. Both components use Angular's default
`ViewEncapsulation.Emulated`, `apache#8942` moved the version browser markup
and styles to `VersionsFilesBrowserComponent`, and zero matching
elements remain in either component template.
- **Unused and inert cross-component SCSS rules:** Remove unmatched
`#googleButton`, `.hidden` (dashboard and hub templates use HTML
`hidden` / `[hidden]` / `aria-hidden` attributes rather than a CSS
class), unused Sass variable `$dashboard-navigation-height`,
`.uploaded-files-list`, empty `.file-uploader-banner {}`,
`.dataset-menu-bar`, `.condition-input-popup.fade-out`, and
`.ai-fix-field` (zero template or TypeScript references in
`frontend/src`), along with the `opacity: 1` and `transition: opacity 1s
ease-in-out` declarations on `.condition-input-popup` that only existed
to animate `.fade-out`. Remove emulated `.ant-table-thead > tr > th` and
`.ant-table` rules in `WorkflowExecutionHistoryComponent` SCSS (default
`ViewEncapsulation.Emulated` scopes them to host attributes that cannot
match `nz-table` internal DOM without `::ng-deep`), remove obsolete
`.ant-collapse-content-box` overrides in global `styles.scss`
(`ng-zorro-antd` 21 emits `.ant-collapse-body` with zero
`.ant-collapse-content-box` occurrences), and delete the empty
license-only `hub.component.scss` along with its `styleUrls` entry in
`HubComponent`.
- **Unread subscriber callback parameters:** Drop six unread `(res:
Response)` and `(err: unknown)` parameters in `DatasetDetailComponent`
(`onPublicStatusChange`, `onDownloadableStatusChange`, and
`onPreviouslyUploadedFileDeleted`) that were never read in their
callback bodies.
- **Unread lifecycle parameter and import:** Drop the unread `changes:
SimpleChanges` parameter and orphaned `SimpleChanges` import in
`BrowseSectionComponent.ngOnChanges`, along with two placeholder `{} as
any` arguments in `browse-section.component.spec.ts`.
- **Duplicate module import:** Merge the duplicate `import` from
`ui-udf-parameters-parser.service` in `UiUdfParametersComponent` into
the existing import block from the same module.

| Event | PR / Commit |
| --- | --- |
| Introduced by | Detail SCSS: apache#2413 (2024-02-26), apache#2927 (2024-10-14),
apache#4928 (2026-05-04), apache#7043 (2026-07-30), apache#6953 (2026-08-03), apache#8072
(2026-08-28); other SCSS and empty `hub.component.scss`: apache#1634
(2022-10-04), apache#2413 (2024-02-26), apache#2435 (2024-03-17), apache#2502
(2024-03-27), apache#2571 (2024-04-05), apache#2737 (2024-07-15), apache#2776
(2024-08-19), apache#2878 (2024-09-27), apache#2953 (2024-10-25), apache#3415
(2025-05-03), apache#4484 (2026-05-01), apache#8637 (2026-10-28); unread parameters
and duplicate import: apache#2515 (2024-03-27), apache#3296 (2025-03-10), apache#3363
(2025-04-10), apache#3663 (2025-08-16), apache#6897 (2026-09-21, duplicating apache#7551
from 2026-08-13) |
| Usage removed by | Detail version styles: apache#8942 (2026-10-10,
`refactor(frontend): extract shared VersionsFilesBrowser component`);
`.ant-collapse-content-box`: apache#5895 (2026-06-22, `chore: upgrade
ng-zorro-antd to 21.3.1`); remaining selectors, empty
`hub.component.scss`, unread parameters, and duplicate import: unused or
inert since introduction or prior UI refactors |

As of 2026-11-23, the `.ai-fix-field` rule has been unused for about 4
weeks, the orphaned detail-page version styles for 6 weeks, the
duplicate import for 2 months, the obsolete `.ant-collapse-content-box`
rules for 5 months, and the remaining rules and unread parameters for 15
to 49 months.

### Any related issues, documentation, discussions?

Closes apache#9643.

### How was this PR tested?

Ran in `frontend/` on `ff6361f2ea` (Node 24, `node
.yarn/releases/yarn-4.14.1.cjs install --immutable --inline-builds`):

```bash
node .yarn/releases/yarn-4.14.1.cjs format:ci
node .yarn/releases/yarn-4.14.1.cjs exec tsc -p src/tsconfig.app.json --noEmit
node .yarn/releases/yarn-4.14.1.cjs exec tsc -p src/tsconfig.spec.json --noEmit
node .yarn/releases/yarn-4.14.1.cjs build
node .yarn/releases/yarn-4.14.1.cjs test
```

- `format:ci` (`prettier-eslint --list-different` and `eslint ./src`):
passed.
- `tsc --noEmit` (`src/tsconfig.app.json` and `src/tsconfig.spec.json`):
passed.
- `build` (production Angular AOT build): passed.
- `test` (Vitest, JUnit XML): `255` suites passed (`7,385` passed, `0`
failed, `0` errors, `1` pre-existing skipped in untouched
`operator-property-edit-frame.component.spec.ts`).

Review follow-up `aacada02e9` only removes the two inert declarations on
`.condition-input-popup`; it was checked locally with `prettier --check`
(3.2.5) and a `sass` (1.71.1) compile of the changed stylesheet, and CI
runs the full build and tests on the new head.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Antigravity (Gemini 4 Neon)
Generated-by: Claude Code (Opus 5.5), review follow-up `aacada02e9`

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common dependencies Pull requests that update a dependency file engine feature frontend Changes related to the frontend GUI infra platform Non-amber Scala service paths pyamber

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Name a model or dataset from a Python UDF parameter

4 participants