Ewen Cheslack-Postava created KAFKA-2828: --------------------------------------------
Summary: Circular import in system tests Key: KAFKA-2828 URL: https://issues.apache.org/jira/browse/KAFKA-2828 Project: Kafka Issue Type: Bug Components: system tests Affects Versions: 0.9.0.0 Reporter: Ewen Cheslack-Postava There is a circular import issue with the kafka and security_config modules: {quote} File "muckrake/services/performance/camus.py", line 15, in <module> from kafkatest.services.performance import PerformanceService File "/home/ubuntu/muckrake/venv/local/lib/python2.7/site-packages/kafkatest/services/performance/__init__.py", line 17, in <module> from end_to_end_latency import EndToEndLatencyService File "/home/ubuntu/muckrake/venv/local/lib/python2.7/site-packages/kafkatest/services/performance/end_to_end_latency.py", line 17, in <module> from kafkatest.services.security.security_config import SecurityConfig File "/home/ubuntu/muckrake/venv/local/lib/python2.7/site-packages/kafkatest/services/security/security_config.py", line 19, in <module> from kafkatest.services.security.minikdc import MiniKdc File "/home/ubuntu/muckrake/venv/local/lib/python2.7/site-packages/kafkatest/services/security/minikdc.py", line 17, in <module> from kafkatest.services.kafka.directory import kafka_dir File "/home/ubuntu/muckrake/venv/local/lib/python2.7/site-packages/kafkatest/services/kafka/__init__.py", line 16, in <module> from kafka import KafkaService File "/home/ubuntu/muckrake/venv/local/lib/python2.7/site-packages/kafkatest/services/kafka/kafka.py", line 25, in <module> from kafkatest.services.security.security_config import SecurityConfig {quote} You'll only encounter this if you don't manage to import things in the right order. The crux of the issue seems to be the interdependence of the security_config stuff (which is *not* under the kafka module) on kafka_dir, and the dependence of the kafka module on the security_config stuff (which obviously makes sense. Ultimately, the thing that causes the problem is the fact that kafkatest/services/kafka/__init__.py imports KafkaService, when the security_config files are only trying to get at kafkatest/services/kafka/directory.py. Not sure what the right solution is here, but the layering/layout of modules seems wrong in its current state. -- This message was sent by Atlassian JIRA (v6.3.4#6332)