maksaska commented on code in PR #13226:
URL: https://github.com/apache/ignite/pull/13226#discussion_r3959830754


##########
modules/ducktests/tests/ignitetest/utils/ignite_test.py:
##########
@@ -32,7 +32,7 @@
 
 class IgniteTestContext(TestContext):
     def __init__(self, test_context):
-        super().__init__()
+        super().__init__(**test_context.__dict__)
         self.__dict__.update(**test_context.__dict__)

Review Comment:
   Thanks - checked both halves against the ducktape 0.15.0 source we're pinning
   
     1) TypeError / filtering the kwargs
   
     TestContext.__init__ is `def __init__(self, **kwargs)` and reads every 
field via
     `kwargs.get(...)`, so unknown keys are silently ignored and a TypeError 
isn't
     reachable — a filter would be dead code. The splat is also ducktape's own 
idiom:
     TestContext.copy() does `TestContext(**self.__dict__)` followed by
     `ctx_copy.__dict__.update(**kwargs)`.
   
     For context on why the line changed at all: 0.15 turned
     `kwargs.get("session_context")` into `kwargs["session_context"]` and then
     dereferences it (`self.session_context.enable_jvm_logs` for 
ServiceRegistry).
     So the previous `super().__init__()` now raises KeyError: 
'session_context', not
     TypeError — that's what our checks caught on the 0.15 bump
     (checks/utils/check_cluster.py drives @cluster -> 
ParametrizableClusterMetadata.apply
     -> IgniteTestContext.resolve). Reverting to option (a) re-breaks it, so 
I've left
     the splat as is.
   
     2) The subsequent self.__dict__.update(...) — agreed, fixed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to