Uploaded image for project: 'Apache Airflow'
  1. Apache Airflow
  2. AIRFLOW-3868

Incorrect import of distutils in JenkinsHook

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 1.10.2
    • None
    • hooks

    Description

      When trying to run a task based upon the JenkinsJobTriggerOperator, the following error is returned.

      [2019-02-11 12:37:30,746] models.py:1788 ERROR - module 'distutils' has no attribute 'util'
      Traceback (most recent call last):
      File "/usr/local/lib/python3.6/site-packages/airflow/models.py", line 1657, in _run_raw_task
      result = task_copy.execute(context=context)
      File "/usr/local/lib/python3.6/site-packages/airflow/contrib/operators/jenkins_job_trigger_operator.py", line 211, in execute
      jenkins_server = self.get_hook().get_jenkins_server()
      File "/usr/local/lib/python3.6/site-packages/airflow/contrib/operators/jenkins_job_trigger_operator.py", line 192, in get_hook
      return JenkinsHook(self.jenkins_connection_id)
      File "/usr/local/lib/python3.6/site-packages/airflow/contrib/hooks/jenkins_hook.py", line 41, in _init_
      if distutils.util.strtobool(connection.extra):
      AttributeError: module 'distutils' has no attribute 'util'

      This seems to be related to the import of distutils in JenkinsHook.

       

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Nathan Nathan Hadfield
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: