spec,reqs: synchronize package versions
ClosedPublic

Authored by kparal on Apr 10 2015, 2:22 PM.

Details

Summary

Edited, skip to D337#6362.

Test Plan

I tried to build the package with make mockchain, it worked.

Diff Detail

Repository
rLTRN libtaskotron
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kparal retitled this revision from to sync and clean up libtaskotron.spec and requirements.txt.Apr 10 2015, 2:22 PM
kparal updated this object.
kparal edited the test plan for this revision. (Show Details)
kparal added reviewers: tflink, mkrizek, jskladan.
jskladan accepted this revision.Apr 14 2015, 8:54 AM
This revision is now accepted and ready to land.Apr 14 2015, 8:54 AM
kparal updated this revision to Diff 918.Apr 14 2015, 1:02 PM

Require exact versions in requirements.txt

After wasting more of my life on packaging woes and reading some clever
articles like these [1], I provided exact version specification in
requirements.txt, so that we have an exactly defined environment when
pulling from pypi. We can't do that in our spec file, so let's use >=
instead. Let's keep these versions in sync, always keeping the to
minimal supported version. As a starting point, I used the current
versions we use in dev and stg environment.

I have not used version requirements in the spec file for packages which
are not on pypi, tell me if you think it's needed.

[1] http://blog.miguelgrinberg.com/post/the-package-dependency-blues

@tflink: Can you please have a look at this as well? Does this make sense?

In D337#6136, @kparal wrote:

Require exact versions in requirements.txt

After wasting more of my life on packaging woes and reading some clever
articles like these [1], I provided exact version specification in
requirements.txt, so that we have an exactly defined environment when
pulling from pypi. We can't do that in our spec file, so let's use >=
instead. Let's keep these versions in sync, always keeping the to
minimal supported version. As a starting point, I used the current
versions we use in dev and stg environment.

While I understand why you set the versions in requirements.txt, I'm not so sure that setting specific version requirements is a great idea. IIRC, requirements.txt doesn't set things in stone like putting the deps in the setup.py but what happens when we want to work on el7 and rawhide? The dependencies we control should be fine but I suspect that the deps we don't control won't have the same versions in both repos.

When the versions are set in setup.py, the setuptools entry points just blow up if the versions don't match exactly and that's not the kind of thing that's caught during rpm build unless you have functional tests which poke at that entry point from the command line. I've lost track of the number of times that's bitten me while deploying blockerbugs.

I propose a compromise - hard set the deps under our control and be a bit looser about the ones that we don't. We'll still need to be more vigilant about making sure that the specfile, requirements.txt and reality match up properly

pyaml - nothing seems to import this anymore

Not sure how you came to this conclusion. PyYAML (provides yaml) is still imported in 6 places that I can see from a quick git grep and is rather critical to formula parsing.

In D337#6149, @tflink wrote:

While I understand why you set the versions in requirements.txt, I'm not so sure that setting specific version requirements is a great idea. IIRC, requirements.txt doesn't set things in stone like putting the deps in the setup.py but what happens when we want to work on el7 and rawhide? The dependencies we control should be fine but I suspect that the deps we don't control won't have the same versions in both repos.

I thought that pypi was always the same, regardless of your base system. Meaning you can pull the same packages, the same versions, whether you are on Fedora 20/21/22/rawhide or RHEL or Debian or something else. Isn't this the case?

The problem would be with the spec file, and that's why I used >= instead of == in the spec file, so that we can easily build it on e.g. Rawhide against newer packages.

When the versions are set in setup.py, the setuptools entry points just blow up if the versions don't match exactly and that's not the kind of thing that's caught during rpm build unless you have functional tests which poke at that entry point from the command line. I've lost track of the number of times that's bitten me while deploying blockerbugs.

And do you prefer this to blow up or not? requirements.txt are not affected like this, because they are only used during manual libtaskotron git checkout and virtualenv use. But I'm not sure whether you consider this to be a benefit or a drawback.

I propose a compromise - hard set the deps under our control and be a bit looser about the ones that we don't. We'll still need to be more vigilant about making sure that the specfile, requirements.txt and reality match up properly

By being looser, you mean using >= in the requirements.txt? Or just leaving out the version completely?

pyaml - nothing seems to import this anymore

Not sure how you came to this conclusion. PyYAML (provides yaml) is still imported in 6 places that I can see from a quick git grep and is rather critical to formula parsing.

There's a trick. pyaml != PyYAML :-)

Oh, one more thing. I removed py as well, because I couldn't find anything that uses it.

I have made too many changes at once, so let's split it. I'll upload separate patches for individual steps, so that we can easily accept those obvious changes, and have easier discussion about those possibly controversial changes.

kparal updated this revision to Diff 944.Apr 23 2015, 10:33 AM

spec,reqs: synchronize package versions

Require exact versions in requirements.txt and >= versions in the spec
file. Make the versions same.

This is now the only change in this diff, so we can discuss it independently of the other changes.

kparal requested a review of this revision.Apr 23 2015, 10:34 AM
jskladan accepted this revision.Apr 23 2015, 10:36 AM
This revision is now accepted and ready to land.Apr 23 2015, 10:36 AM
kparal retitled this revision from sync and clean up libtaskotron.spec and requirements.txt to spec,reqs: synchronize package versions.Apr 23 2015, 10:38 AM
kparal updated this object.
This revision now requires review to proceed.May 5 2015, 11:36 AM

Since Tim had most concerns, I removed Martin and Josef from reviewers, so that it doesn't show up in their queues needlessly, but it shows up in Tim's (at least this is the way Phab works, I think). No rush in responding, this is not high priority. I'm just tidying up.

tflink accepted this revision.May 6 2015, 4:05 PM

I think it looks good for now, just bump the revision in the specfile and make a note in the changelog.

we may need to revisit this if/when we start supporting el7 but we can cross that bridge if/when we get there

This revision is now accepted and ready to land.May 6 2015, 4:05 PM
This revision was automatically updated to reflect the committed changes.