Use the task implementation version in the fingerprint of a task

Review Request #3546 — Created March 7, 2016 and submitted

stuhood
pants
3020
pants-reviews
molsen, patricklaw

Use the task implementation version in the fingerprint of a task, to cause cache invalidation for TaskIdentityFingerprintStrategy.

Currently the implementation_version is only used in the CacheManager's generated directory name, but not also in the cache key.

https://travis-ci.org/pantsbuild/pants/builds/114656065

  • 0
  • 0
  • 0
  • 1
  • 1
Description From Last Updated
MO
  1. Ship It!
  2. 
      
ST
ST
WI
  1. 
      
  2. src/python/pants/task/task.py (Diff revision 3)
     
     
     

    combine them into one to save one hash computation?

    1. I don't think that actually saves time... the hasher is walking over the encoded bytes of the string and updating an internal value. Concating the strings would cause them to be copied, but either way, the hasher has to walk all of the bytes.

  3. 
      
PA
  1. 
      
  2. src/python/pants/task/task.py (Diff revision 3)
     
     

    I'd prefer for clarity:

    '.'.join(
      '_'.join(str(part) for part in task_version_parts)
      for task_version_parts in cls.implementation_version()
    )
    
  3. 
      
ST
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as fc3911085e5e9e2b209c285656bee9925c875364

Loading...