Bug #3848

[SDK] Python SDK should always set proper version when built from git

Added by Brett Smith almost 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Brett Smith
Category:
SDKs
Target version:
Start date:
09/22/2014
Due date:
% Done:

100%

Estimated time:
(Total: 2.00 h)
Story points:
0.5

Description

One thing that would help debug Docker images is if the Arvados Python modules were installed with version numbers that match what we publish. Right now, they just use the plain string '0.1', which means you have to use other metadata to figure out the real version. It would be nice to build the packages with the same version information we use in production, so that pip freeze tells you at a glance what version you're running. See the setup.py egg_info command in Hacking Python SDK for a demonstration of how to do this.

This information would be useful in other contexts, too (i.e., "What version do I have on this development box?"). It might be worth investigating if there's a good way to put this information in setup.py. Note that simply appending the string like we do in our Gemfiles is not appropriate—that will cause setup.py to fail when it's run outside a git tree. Instead this would probably involve extending the egg_info command to look for git information and add it to the default version value.


Subtasks

Task #3952: Review 3848-egg-default-git-tag-wipResolvedBrett Smith

Task #4110: Review arvados-dev branch 3848-build-packages-pyversionResolvedWard Vandewege

Associated revisions

Revision 60dbf9f6 (diff)
Added by Brett Smith almost 5 years ago

3848: Stop manually tagging Python builds.

This is now done in setup.py. Refs #3848.

Revision 60dbf9f6 (diff)
Added by Brett Smith almost 5 years ago

3848: Stop manually tagging Python builds.

This is now done in setup.py. Refs #3848.

Revision f1c20b66
Added by Brett Smith almost 5 years ago

Merge branch '3848-egg-default-git-tag-wip'

Closes #3848, #3952.

Revision c65e0ee8
Added by Brett Smith almost 5 years ago

Merge branch '3848-build-packages-pyversion'

Refs #3848. Closes #4110.

Revision c65e0ee8
Added by Brett Smith almost 5 years ago

Merge branch '3848-build-packages-pyversion'

Refs #3848. Closes #4110.

History

#1 Updated by Brett Smith almost 5 years ago

  • Subject changed from Docker images should install Python modules with proper versions to Docker images should install Python modules with proper version numbers
  • Description updated (diff)

#2 Updated by Ward Vandewege almost 5 years ago

  • Subject changed from Docker images should install Python modules with proper version numbers to [SDK] Docker images should install Python modules with proper version numbers

#3 Updated by Ward Vandewege almost 5 years ago

  • Target version set to Arvados Future Sprints

#4 Updated by Brett Smith almost 5 years ago

  • Subject changed from [SDK] Docker images should install Python modules with proper version numbers to [SDK] Python SDK should always set proper version when built from git
  • Category set to SDKs

Discussed in sprint planning that we want to solve this at the SDK level; i.e., customize the egg_info command in setup.py as discussed in the description.

#5 Updated by Brett Smith almost 5 years ago

If this can be done by hooking into egg_info, it's 0.5 points. If it can't, it's 1.0, because you'll have to change the build process in other places like Jenkins.

#6 Updated by Ward Vandewege almost 5 years ago

  • Target version changed from Arvados Future Sprints to 2014-10-08 sprint

#7 Updated by Brett Smith almost 5 years ago

  • Status changed from New to In Progress
  • Assigned To set to Brett Smith

Moved up in priority. Now that the FUSE driver has a dependency on a specific version of the SDK, it's even more important for developers to be able to get the right version easily.

#8 Updated by Brett Smith almost 5 years ago

  • Story points set to 0.5

#9 Updated by Peter Amstutz almost 5 years ago

My only comment is that maybe we should be using UTC for the timestamp? Otherwise LGTM.

#10 Updated by Brett Smith almost 5 years ago

Peter Amstutz wrote:

My only comment is that maybe we should be using UTC for the timestamp? Otherwise LGTM.

Implemented in 7aa4ca1. Updated the Ruby Gemspecs too, for consistency.

#11 Updated by Peter Amstutz almost 5 years ago

Brett Smith wrote:

Peter Amstutz wrote:

My only comment is that maybe we should be using UTC for the timestamp? Otherwise LGTM.

Implemented in 7aa4ca1. Updated the Ruby Gemspecs too, for consistency.

Just curious, what's the rationale for including the git hash in the python package version but not the gem version?

Otherwise looks good, please merge.

#12 Updated by Brett Smith almost 5 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Applied in changeset arvados|commit:f1c20b66097f1bb37c0ffc8808b4a5831e91f87b.

#13 Updated by Brett Smith almost 5 years ago

Peter Amstutz wrote:

Just curious, what's the rationale for including the git hash in the python package version but not the gem version?

I don't know, that decision predates me. Maybe we usually want it but Ruby Gems don't like hex in the version number?

Merged, thanks.

#14 Updated by Ward Vandewege almost 5 years ago

The arvados-dev 3848-build-packages-pyversion branch looks good to me, I tested it and it does what is expected. Thanks!

Also available in: Atom PDF