feat: expose structured Function refresh options in SDKs (#5047)

## Problem

ENT-3267 still lacks typed refresh controls for `supervisor_resources`
and `planning_workers` in Python, Rust, and Node, and Node has no
`retry_policy` refresh option. Callers must drop to SQL for those
controls.

## Change

- Add canonical Rust `FunctionRefreshPodResources` and
`FunctionRefreshPlanningConfig`, and serialize them through
`RefreshColumnOptions`.
- Expose both options in the Python sync/async wrappers and PyO3
binding.
- Expose both options in the Node NAPI object and add a Node
`retryPolicy` object backed by the existing Rust `FunctionRetryPolicy`.
- Omitted options stay omitted; branch targeting continues through the
table handle. No server, dependency, or pin changes are included.

Client-side checks only reject non-positive structural values.
Deployment resource limits and column-kind validation remain
server-side.

## Validation

`cargo fmt --all -- --check`, `python3 -m py_compile`, and `git diff
--check` pass. No native build was run locally; CI compiles and tests
the change. Generated JS API pages are unchanged.
This commit is contained in:
Xuanwo
2026-11-14 20:59:44 +08:00
committed by GitHub
parent 4843ac4c7e
commit f6f8119ba4
21 changed files with 1164 additions and 10 deletions
@@ -117,6 +117,16 @@ Worker count for an expression column; Function columns reject it.
***
### planningWorkers?
```ts
optional planningWorkers: FunctionRefreshPlanningConfig;
```
Resources and sizing for the refresh planning fleet.
***
### publicationIntervalRows?
```ts
@@ -141,6 +151,16 @@ refresh. `gpuCount` inside the budget defaults to zero.
***
### retryPolicy?
```ts
optional retryPolicy: FunctionRetryPolicy;
```
Override retries of failed user-code calls for this refresh.
***
### rowTimeoutSeconds?
```ts
@@ -151,6 +171,16 @@ Deadline for one Function call, in seconds.
***
### supervisorResources?
```ts
optional supervisorResources: FunctionRefreshPodResources;
```
CPU, memory, and ephemeral-storage limits for the refresh supervisor.
***
### where?
```ts