/// <summary> /// Older storage did not have metainfo files. We need to read full results, create new metainfo file and store it. /// </summary> /// <param name="bundleId"></param> private async Task CreateBundleMetainfoForCompat(string bundleId) { var metainfo = new BundleMetainfo() { BundleId = bundleId }; // use storage directly, not repo. repo might not be initialized yet // back then, every dump had the same information encoded. take the first dump and use it from there. var dumps = await dumpStorage.ReadDumpMetainfoForBundle(bundleId); // loop through all dumps and hope to find a good one. foreach (var dump in dumps) { if (dump != null) { metainfo.Created = dump.Created; metainfo.Finished = dump.Created; // can't do better. metainfo.Status = BundleStatus.Finished; var fullresult = await dumpStorage.ReadResults(dump.Id); if (fullresult != null) { if (!string.IsNullOrEmpty(fullresult.AnalysisInfo.JiraIssue)) { metainfo.CustomProperties["ref"] = fullresult.AnalysisInfo.JiraIssue; } if (!string.IsNullOrEmpty(fullresult.AnalysisInfo.FriendlyName)) { metainfo.CustomProperties["note"] = fullresult.AnalysisInfo.FriendlyName; } break; } } } WriteMetainfoFile(metainfo, pathHelper.GetBundleMetadataPath(bundleId)); }
public async Task <SDResult> GetResult(DumpIdentifier id) => await storage.ReadResults(id);