Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-8949

Package pip provide won't work with ensure latest and custom index

    Details

    • Template:
      PUP Bug Template
    • Acceptance Criteria:
      Hide

      Puppet can install latest version with custom index idempotently. 

      Show
      Puppet can install latest version with custom index idempotently. 
    • Team:
      Night's Watch
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      The `pip` package provider did not use 'install_options` in the methods executed when `ensure = latest` which prevented those resources from being idempotent.

      'install_options' are now used whenever `pip install` is executed.
      Show
      The `pip` package provider did not use 'install_options` in the methods executed when `ensure = latest` which prevented those resources from being idempotent. 'install_options' are now used whenever `pip install` is executed.
    • QA Risk Assessment:
      Needs Assessment

      Description

      Puppet agent will run every time if you have ensure => latest and custom index, for example

      package { 'mypippackage':
        ensure          => latest,
        provider        => 'pip',
        install_options => { '--index' => 'https://pip.example.com' },
      } 

      I believe the issue is happening because puppet doesn't test package version against additional index (doesn;t use --index), while using --index on install.

      Debug: Executing '/usr/bin/pip --version'
      Debug: Executing '/usr/bin/pip freeze --all'
      Debug: Executing '/usr/bin/pip --version'
      Debug: Executing '/usr/bin/pip --version'
      Debug: Executing '/usr/bin/pip install mypippackage==versionplease'
      Debug: /Stage[main]/Main/Package[mypippackage]/ensure: mypippackage "1.2.3.post0" is installed, latest is nil
      Debug: Executing: '/usr/bin/pip install -q --index=https://pip.example.com --upgrade mypippackage'
      Notice: /Stage[main]/Main/Package[mypippackage]/ensure: ensure changed '1.2.3.post0' to 'latest'
       

        Attachments

          Activity

            People

            • Assignee:
              tom.kishel Thomas Kishel
              Reporter:
              a_fomenko Anton Fomenko
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support