Skip to content

[SPARK-55858][PYTHON][INFRA] Fix UDF logging tests under coverage#54649

Open
gaogaotiantian wants to merge 1 commit intoapache:masterfrom
gaogaotiantian:fix-udf-logging-coverage
Open

[SPARK-55858][PYTHON][INFRA] Fix UDF logging tests under coverage#54649
gaogaotiantian wants to merge 1 commit intoapache:masterfrom
gaogaotiantian:fix-udf-logging-coverage

Conversation

@gaogaotiantian
Copy link
Contributor

What changes were proposed in this pull request?

When we patch workers with coverage, pretend the sitecustomize module that coverage uses to be the worker module.

Why are the changes needed?

UDF logging uses module name to determine whether the code is user code. With coverage, we have a strange module sitecustomize and UDF logging believes it's user code - which breaks the test.

We should not modify our production code to make coverage work, so we patch the coverage code.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Locally the failed test passed.

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

No.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants