Fix a bug preventing re-upload artifacts that encountered read-errors

Review Request #3141 - Created Nov. 17, 2015 and submitted

Information
Peiyu Wang
pants
peiyuwang:peiyu/fix-write-artifact-in-error-back
2584
8aaa7b1...
Reviewers
pants-reviews
benjyw, patricklaw, stuhood, zundel

We have this function from rb/1361 to write generated artifacts back to cache
for artifacts encountered read errors. Unfortunately this probably never worked.

  elif isinstance(was_in_cache, UnreadableArtifact):
    self._cache_key_errors.update(was_in_cache.key)

set.update takes iterable, since was_in_cache.key is a namedtuple of three
elements, we get a set of these three elements instead of the cacheKey, and
subsequent check when it comes to write generated artifact back will fail.

Change update to add fixes this

https://travis-ci.org/peiyuwang/pants/builds/91542791

Benjy Weinberger
Stu Hood
Peiyu Wang
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as cd7a188fd99ec4ca024587b0c8eb15ba987c1ba7

Patrick Lawson
Ship It!
Loading...