Skip to content
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.

python_runtime broken with pip 19.x #140

Open
thoellrich opened this issue Jan 29, 2019 · 7 comments · May be fixed by #142
Open

python_runtime broken with pip 19.x #140

thoellrich opened this issue Jan 29, 2019 · 7 comments · May be fixed by #142

Comments

@thoellrich
Copy link

python_runtime "2" is broken on a ubuntu 16.04 system with Chef 12. When python_runtime is executing, pip 19.0.1 is installed and the internals have changed a lot since pip 18.x. Any attempt to locate setuptools, wheel, etc is met with AttributeError: Values instance has no attribute 'process_dependency_links'. process_dependency_links option has been removed in pip 19 and this line causes the issue: https://github.com/poise/poise-python/blob/master/lib/poise_python/resources/python_package.rb#L73.

Once you remove the option, there's another breakage with req = InstallRequirement.from_line(arg). This line seems to have changed with a later, unreleased version of poise-python (changed after 1.7.0).

@isuftin
Copy link

isuftin commented Jan 29, 2019

Seeing the same issue on our end on CentOS 7

@jmelowry
Copy link

jmelowry commented Jan 30, 2019

Also experiencing this in Ubuntu 14.04.5, using Chef 12.

@hrak
Copy link

hrak commented Feb 5, 2019

Its not just limited to Chef 12, latest Chef 13 results in the same error

Recipe: poise-python::default
  * python_runtime[2] action install
    * poise_languages_system[python2.7] action install
      - install version 2.7.12-1ubuntu0~16.04.4 of package python2.7-dev
    * apt_package[python2.7, python2.7-dev] action nothing (skipped due to action :nothing)

  * python_runtime_pip[2] action install
    - Bootstrapping pip latest from https://bootstrap.pypa.io/get-pip.py
  * python_package[setuptools] action install

    ================================================================================
    Error executing action `install` on resource 'python_package[setuptools]'
    ================================================================================

    Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    Expected process to exit with [0], but received '1'
    ---- Begin output of ["/usr/bin/python2.7", "-", "setuptools"] ----
    STDOUT:
    STDERR: Traceback (most recent call last):
      File "<stdin>", line 33, in <module>
    AttributeError: Values instance has no attribute 'process_dependency_links'
    ---- End output of ["/usr/bin/python2.7", "-", "setuptools"] ----
    Ran ["/usr/bin/python2.7", "-", "setuptools"] returned 1

    Cookbook Trace:
    ---------------
    /opt/kitchen/cache/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:207:in `tap'
    /opt/kitchen/cache/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:207:in `language_command_shell_out!'
    /opt/kitchen/cache/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:222:in `block in language_command_mixin'
    /opt/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:329:in `pip_command'
    /opt/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:353:in `pip_outdated'
    /opt/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:221:in `check_package_versions'
    /opt/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:200:in `load_current_resource'
    /opt/kitchen/cache/cookbooks/poise/files/halite_gem/poise/helpers/notifying_block.rb:69:in `notifying_block'
    /opt/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb:50:in `action_install'

    Resource Declaration:
    ---------------------
    # In /opt/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb

    138:         python_package 'setuptools' do
    139:           parent_python new_resource
    140:           version setuptools_version if setuptools_version.is_a?(String)
    141:         end
    142:       end

    Compiled Resource:
    ------------------
    # Declared in /opt/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb:138:in `install_setuptools'

    python_package("setuptools") do
      package_name "setuptools"
      action [:install]
      default_guard_interpreter :default
      declared_type :python_package
      cookbook_name "poise-python"
      parent_python python_runtime[2]
      timeout 900
    end

    System Info:
    ------------
    chef_version=13.11.3
    platform=ubuntu
    platform_version=16.04
    ruby=ruby 2.4.4p296 (2018-03-28 revision 63013) [x86_64-linux]
    program_name=chef-client worker: ppid=956;start=08:35:00;
    executable=/opt/chef/embedded/bin/chef-client


  ================================================================================
  Error executing action `install` on resource 'python_runtime[2]'
  ================================================================================

  Mixlib::ShellOut::ShellCommandFailed
  ------------------------------------
  python_package[setuptools] (/opt/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb line 138) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
  ---- Begin output of ["/usr/bin/python2.7", "-", "setuptools"] ----
  STDOUT:
  STDERR: Traceback (most recent call last):
    File "<stdin>", line 33, in <module>
  AttributeError: Values instance has no attribute 'process_dependency_links'
  ---- End output of ["/usr/bin/python2.7", "-", "setuptools"] ----
  Ran ["/usr/bin/python2.7", "-", "setuptools"] returned 1

  Cookbook Trace:
  ---------------
  /opt/kitchen/cache/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:207:in `tap'
  /opt/kitchen/cache/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:207:in `language_command_shell_out!'
  /opt/kitchen/cache/cookbooks/poise-languages/files/halite_gem/poise_languages/command/mixin.rb:222:in `block in language_command_mixin'
  /opt/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:329:in `pip_command'
  /opt/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:353:in `pip_outdated'
  /opt/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:221:in `check_package_versions'
  /opt/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/resources/python_package.rb:200:in `load_current_resource'
  /opt/kitchen/cache/cookbooks/poise/files/halite_gem/poise/helpers/notifying_block.rb:69:in `notifying_block'
  /opt/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb:50:in `action_install'

  Resource Declaration:
  ---------------------
  # In /opt/kitchen/cache/cookbooks/poise-python/recipes/default.rb

   20: python_runtime '2' if node['poise-python']['install_python2']

  Compiled Resource:
  ------------------
  # Declared in /opt/kitchen/cache/cookbooks/poise-python/recipes/default.rb:20:in `from_file'

  python_runtime("2") do
    action [:install]
    updated true
    updated_by_last_action true
    default_guard_interpreter :default
    subresources [python_package[couchbase], python_runtime_pip[2], python_package[setuptools], python_package[wheel], python_package[virtualenv]]
    declared_type :python_runtime
    cookbook_name "poise-python"
    recipe_name "default"
    get_pip_url "https://bootstrap.pypa.io/get-pip.py"
    pip_version true
    setuptools_version true
    version "2"
    virtualenv_version true
    wheel_version true
  end

  System Info:
  ------------
  chef_version=13.11.3
  platform=ubuntu
  platform_version=16.04
  ruby=ruby 2.4.4p296 (2018-03-28 revision 63013) [x86_64-linux]
  program_name=chef-client worker: ppid=956;start=08:35:00;
  executable=/opt/chef/embedded/bin/chef-client

@Raboo
Copy link

Raboo commented Feb 12, 2019

Duplicate of #133 it seems.

Workaround until 1.7.1 is released.

node.default['poise-python']['options']['pip_version'] = '18.0'
include_recipe 'poise-python'

@salsa-dev
Copy link

Chef Development Kit Version: 3.3.23
chef-client version: 14.5.33

i confirm the fix #142 is working

please release release release !!!!!

@kannan4k
Copy link

Please release it, waiting for it!

@ponchov
Copy link

ponchov commented Mar 18, 2019

still having the issue, I've tried many things and it's still not working.
Platform: Opsworks. Ubuntu 16, Chef 12.

Please release the new version, I'm looking for it!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants