defold / extender

Native extension build server
https://defold.com/manuals/extensions/
MIT License
44 stars 19 forks source link

Fix cache issue #420

Closed ekharkunov closed 2 months ago

ekharkunov commented 2 months ago

Fix issue when one of precondition was failed during cache entry upload due to concurrency from the side of other jobs.

Caused by: com.google.api.client.http.HttpResponseException: 412 Precondition Failed 
PUT https://storage.googleapis.com/upload/storage/v1/b/************/o?ifGenerationMatch=*************
{ 
  "error": { 
    "code": 412, 
    "message": "At least one of the pre-conditions you specified did not hold.", 
    "errors": [ 
      { 
        "message": "At least one of the pre-conditions you specified did not hold.", 
        "domain": "global", 
        "reason": "conditionNotMet", 
        "locationType": "header", 
        "location": "If-Match" 
      } 
    ] 
  } 
} 

Now we catch and skip exception because it safe to continue because other job already uploaded the same cache entry.