Skip to content

Remove the deprecated Python UDF V1 - #1958

Merged
Yicong-Huang merged 5 commits into
masterfrom
yicong-remove-pythonUDFv1
Jun 5, 2023
Merged

Yicong-Huang merged 5 commits into
masterfrom
yicong-remove-pythonUDFv1

Conversation

@Yicong-Huang

@Yicong-Huang Yicong-Huang commented Jun 3, 2023 •

Copy link
Copy Markdown
Contributor

This PR is the continuation of #1492. All existing users should have been migrated to PythonUDFV2 already. This PR removes the deprecated PythonUDFV1 from the codebase and renames the affected resources.

@Yicong-Huang Yicong-Huang self-assigned this Jun 3, 2023
@Yicong-Huang Yicong-Huang added pyamber refactor Refactor the code labels Jun 3, 2023
# Conflicts:
#	core/amber/src/main/scala/edu/uci/ics/amber/engine/architecture/controller/promisehandlers/ModifyLogicHandler.scala
#	core/amber/src/main/scala/edu/uci/ics/texera/workflow/common/operators/PythonOperatorDescriptor.scala

@Xiao-zhen-Liu Xiao-zhen-Liu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@Yicong-Huang
Yicong-Huang merged commit dc6dc45 into master Jun 5, 2023
@Yicong-Huang
Yicong-Huang deleted the yicong-remove-pythonUDFv1 branch June 5, 2023 06:15
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
This PR is the continuation of apache#1492. All existing users should have
been migrated to PythonUDFV2 already. This PR removes the deprecated
`PythonUDFV1` from the codebase and renames the affected resources.
aglinxinyuan added a commit to aglinxinyuan/texera that referenced this pull request Oct 24, 2026
)

### What changes were proposed in this PR?

Removes the UDF Python log settings that nothing reads. **−30 lines.**
There is no behaviour change.

- `udf.conf`: the `python.log.fileHandler` section (`dir`, `level`,
`format` and their `UDF_PYTHON_LOG_FILEHANDLER_*` overrides) and
`python.log.streamHandler.format` (with
`UDF_PYTHON_LOG_STREAMHANDLER_FORMAT`).
- `UdfConfig`: `pythonLogStreamHandlerFormat`,
`pythonLogFileHandlerDir`, `pythonLogFileHandlerLevel`,
`pythonLogFileHandlerFormat`. The vals and the keys go together, because
the vals' eager `getString` would throw once a key is gone.
- `UdfConfigSpec`: the assertions for the removed settings.

`python.log.streamHandler.level` stays. `PythonWorkflowWorker` forwards
it as `loggerLevel`, and CI sets `UDF_PYTHON_LOG_STREAMHANDLER_LEVEL`.

### History

| | |
| --- | --- |
| **Introduced by** | apache#1119 (2021-05-13), "Add simple debug logging to
PythonUDF": the conf keys. apache#3466 (2025-06-12), "Move all conf files and
readers to `core/config`": the `UdfConfig` vals |
| **Usage removed by** | apache#1958 (2023-06-04), "Remove the deprecated
Python UDF V1". It deleted the Java launcher that read these keys and
attached the file handler. The `UdfConfig` vals were **never used** |

The keys have been dead for over three years. The worker installs one
stderr sink at the forwarded level and has never received a format or a
file-handler setting since apache#1958.

### Any related issues, documentation, discussions?

Closes apache#8741

### How was this PR tested?

No new tests. `UdfConfigSpec` keeps its cases for the surviving
settings.

Locally, from the repo root with Java 17:

- `sbt "Config/Test/compile" "WorkflowExecutionService/Test/compile"`:
success.
- `sbt "Config/testOnly *UdfConfigSpec *PythonUtilsSpec"`: 4 tests, all
pass.
- `sbt "Config/scalafmtCheckAll" "Config/scalafixAll --check"
"WorkflowExecutionService/scalafmtCheckAll"
"WorkflowExecutionService/scalafixAll --check"`: clean.

To re-check:

```
git grep -n -E "fileHandler|LOG_FILEHANDLER|STREAMHANDLER_FORMAT|pythonLogStreamHandlerFormat"   # no hits
```

### 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pyamber refactor Refactor the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants