[ 
https://issues.apache.org/jira/browse/IMPALA-15204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18098346#comment-18098346
 ] 

ASF subversion and git services commented on IMPALA-15204:
----------------------------------------------------------

Commit 59556c90257b598e2bf7a1adee421de07565c0ad in impala's branch 
refs/heads/master from Anubhav Jindal
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=59556c902 ]

IMPALA-15204: Upgrade operator Kopf for Python 3.14

Upgrade the operator's Kopf dependency to a Python 3.14-compatible
release so runtime reconcile logging does not fail with NoneType lock
errors.

Testing:
- python3 -m py_compile operator/impala-operator/main.py
- docker run --rm -v /Users/anubhav/Desktop/impala-upstream-clean:/repo \
  -w /repo/operator/impala-operator python:3.14.6-slim sh -lc \
  'python -m pip install --no-cache-dir -r requirements.txt && \
   python -c "from kopf._core.engines.posting import K8sPoster; \
   h=K8sPoster(); print(h.lock is None)"' (prints False)

Change-Id: I68bd973ff7a6ddb1f70fb819537c47025d80efc7
Assisted-by: GPT-5.3 (Cursor)
Reviewed-on: http://gerrit.cloudera.org:8080/24621
Reviewed-by: Jason Fehr <[email protected]>
Tested-by: Jason Fehr <[email protected]>


> Upgrade Impala operator Kopf dependency for Python 3.14 compatibility
> ---------------------------------------------------------------------
>
>                 Key: IMPALA-15204
>                 URL: https://issues.apache.org/jira/browse/IMPALA-15204
>             Project: IMPALA
>          Issue Type: Bug
>            Reporter: Anubhav Jindal
>            Assignee: Anubhav Jindal
>            Priority: Critical
>
> *Description* 
> {{IMPALA-14981}} moved the operator image to {{{}python:3.14.6-slim{}}}, but 
> the operator can fail at runtime with: {{TypeError: 'NoneType' object does 
> not support the context manager protocol}} during reconcile/logging paths.
> Root cause is a compatibility issue between older {{kopf}} ({{{}1.37.2{}}}) 
> and Python {{3.13+}} logging behavior.
> In older Kopf, a handler lock optimization can leave {{{}lock=None{}}}, while 
> newer Python logging expects a context-manager lock in handler paths.
> *Proposed fix:*
>  * Keep Python at {{3.14.6-slim}}
>  * Upgrade operator dependency from {{kopf==1.37.2}} to a 
> Python-3.14-compatible version ({{{}kopf==1.44.6{}}})
>  * Keep {{kubernetes==30.1.0}} unchanged unless compatibility issues are found
> *Testing:*
>  * Build operator image with Python {{3.14.6-slim}} + upgraded Kopf
>  * Deploy on local k3d test cluster
>  * Reconcile {{ImpalaCluster}} and verify operator reaches {{Ready}}
>  * Verify no {{{}TypeError{}}}/{{{}NoneType{}}} logging crash in operator logs
>  * Run existing operator/unit checks ({{{}test_main.py{}}}) and lint/critique 
> checks
> *Impact:*
>  * Restores runtime stability for operator on latest Python base image
>  * Avoids reverting to older Python image while keeping dependency stack 
> compatible



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to