Project

General

Profile

Actions

Bug #3848

closed

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

Added by Brett Smith over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
SDKs
Target version:
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 2 (0 open2 closed)

Task #3952: Review 3848-egg-default-git-tag-wipResolvedBrett Smith09/22/2014Actions
Task #4110: Review arvados-dev branch 3848-build-packages-pyversionResolvedWard Vandewege09/22/2014Actions
Actions #1

Updated by Brett Smith over 9 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)
Actions #2

Updated by Ward Vandewege over 9 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
Actions #3

Updated by Ward Vandewege over 9 years ago

  • Target version set to Arvados Future Sprints
Actions #4

Updated by Brett Smith over 9 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.

Actions #5

Updated by Brett Smith over 9 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.

Actions #6

Updated by Ward Vandewege over 9 years ago

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

Updated by Brett Smith over 9 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.

Actions #8

Updated by Brett Smith over 9 years ago

  • Story points set to 0.5
Actions #9

Updated by Peter Amstutz over 9 years ago

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

Actions #10

Updated by Brett Smith over 9 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.

Actions #11

Updated by Peter Amstutz over 9 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.

Actions #12

Updated by Brett Smith over 9 years ago

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

Applied in changeset arvados|commit:f1c20b66097f1bb37c0ffc8808b4a5831e91f87b.

Actions #13

Updated by Brett Smith over 9 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.

Actions #14

Updated by Ward Vandewege over 9 years ago

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

Actions

Also available in: Atom PDF