• Yuwei Huang's avatar
    Fix filename sorting logic in git_cache.py · a1fbdff1
    Yuwei Huang authored
    We have trouble rolling dep of the grpc library. It looks like buildbots
    use git_cache to download cache of the library from cloud storage, but
    the way it picks up the latest cache is to do a string sort on the
    filenames then pick the last one. This won't work if the filenames have
    digit carrying, say you have both 9999.zip and 10000.zip, then 9999.zip
    will get picked up.
    
    This CL fixes this by implementing a new filename sorting logic that
    extracts the numeral part of the filename and sort on it.
    
    Bug: 927154
    Change-Id: I68fce3fe67e55ce5092e7e9dc1dca606b427fe87
    Reviewed-on: https://chromium-review.googlesource.com/c/1448954
    Commit-Queue: Yuwei Huang <yuweih@chromium.org>
    Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
    Reviewed-by: 's avatarRobbie Iannucci <iannucci@chromium.org>
    a1fbdff1
git_cache.py 30.5 KB