Jira (PUP-2905) When installing PIP packages from sources different than pypi, the install and any notifies are triggered during every run.

3 views
Skip to first unread message

Amos Shapira (JIRA)

unread,
Sep 16, 2015, 9:24:06 PM9/16/15
to puppe...@googlegroups.com
Amos Shapira updated an issue
 
Puppet / Bug PUP-2905
When installing PIP packages from sources different than pypi, the install and any notifies are triggered during every run.
Change By: Amos Shapira
I have a plugin for a Python application, Sentry, which I am installing via GitHub like so:

{code:puppet}
    package{ 'sentry-hipchat':
      ensure   => 'cfac72b33dc8468745669ea65998a5b911e9aae0',
      provider => 'pip',
      source   => 'git+git://github.com/invisiblehand/sentry-hipchat.git'
    }
{code}

When running the Puppet agent with  {{  --debug --trace --test }} , I can see Puppet checks the output of 'pip freeze', however the output from this command, for packages installed from GitHub seems to differ, and I don't believe it will match the regex used here:

https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/package/pip.rb#L16-L22

Here is some sample output from 'pip freeze' on my system:

{noformat}
    raven==3.5.1
    redis==2.8.0
    sentry==6.3.3
    -e git://github.com/invisiblehand/sentry-hipchat.git@cfac72b33dc8468745669ea65998a5b911e9aae0#egg=sentry_hipchat-master
    setproctitle==1.1.8
    simplejson==3.3.1
{noformat}

I'm using Puppet 2.7.13, installed via RubyGems, on Ubuntu 12.04 LTS 64-bit, running Ruby 1.9.3p448.

The output from the Puppet agent run is as follows:

{noformat}
    debug: Puppet::Type::Package::ProviderPip: Executing '/usr/bin/pip freeze'
    debug: Puppet::Type::Package::ProviderPip: Executing '/usr/bin/pip freeze'
    debug: Puppet::Type::Package::ProviderPip: Executing '/usr/bin/pip install -q -e git+git://github.com/invisiblehand/sentry-hipchat.git@cfac72b33dc8468745669ea65998a5b911e9aae0#egg=sentry-hipchat'
    notice: /Stage[main]/Ih-sentry/Package[sentry-hipchat]/ensure: created
    info: /Stage[main]/Ih-sentry/Package[sentry-hipchat]: Scheduling refresh of Service[sentry]
    info: /Stage[main]/Ih-sentry/Package[sentry-hipchat]: Scheduling refresh of Service[sentry-udp]
    info: /Stage[main]/Ih-sentry/Package[sentry-hipchat]: Scheduling refresh of Service[sentry-celery]
{noformat}

As you can see, the package is 'created', which triggers a refresh of the services, even though there is no need.

Does anyone have any advice?

Thanks!

Ryan
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4)
Atlassian logo

Bryan Andrews (JIRA)

unread,
Apr 20, 2016, 5:10:05 PM4/20/16
to puppe...@googlegroups.com
Bryan Andrews commented on Bug PUP-2905
 
Re: When installing PIP packages from sources different than pypi, the install and any notifies are triggered during every run.

I thought I had this same problem but it turns out I was installing the package "cx_Oracle" with an underscore because that was the name found with pip3 search. Which also successfully installs it. However `pip3 freeze` was showing it as "cx-Oracle" with a dash. I changed the name of the package to match what `pip3 freeze` showed and everything is fine.

This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9)
Atlassian logo

Mark McKinstry (JIRA)

unread,
Jul 6, 2016, 10:28:11 AM7/6/16
to puppe...@googlegroups.com

Alessio,

With your workaround, if you ever want to uprade to a newer version, say the tarball from 6b311b0da17a57e2f2317ed161055b3b9bd1ab04, puppet won't upgrade it because the ensure just checks to see if any version is installed, not a specific version.

package{ "HarvestingKit": 
  ensure   => present, 
  provider => pip,
  source   => "https://github.com/inspirehep/harvesting-kit/tarball/e163844543a6f3cf04369975645659334dac144c",
}

Russell Mull (JIRA)

unread,
May 15, 2017, 8:02:07 PM5/15/17
to puppe...@googlegroups.com
Russell Mull updated an issue
 
Change By: Russell Mull
Team: Agent
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Russell Mull (JIRA)

unread,
May 15, 2017, 8:02:10 PM5/15/17
to puppe...@googlegroups.com

Moses Mendoza (JIRA)

unread,
May 18, 2017, 1:44:41 PM5/18/17
to puppe...@googlegroups.com

Branan Riley (JIRA)

unread,
May 9, 2018, 3:04:03 PM5/9/18
to puppe...@googlegroups.com
Branan Riley updated an issue
Change By: Branan Riley
Labels: cern git http https package pip redmine source triaged type_and_provider
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Josh Cooper (JIRA)

unread,
Oct 1, 2019, 2:35:04 PM10/1/19
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Feb 16, 2021, 3:25:03 PM2/16/21
to puppe...@googlegroups.com
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages