Skip to content

Commit

Permalink
Fix: CI package changes from work on Firely.Packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
GinoCanessa committed Sep 17, 2024
1 parent 855f8f2 commit 9392ac9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
2 changes: 1 addition & 1 deletion fhir-candle.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<Company>FHIR Foundation Project</Company>
<Copyright>Copyright 2022-2024</Copyright>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/GinoCanessa/fhir-candle</RepositoryUrl>
<RepositoryUrl>https://github.com/FHIR/fhir-candle</RepositoryUrl>
<NeutralLanguage>en</NeutralLanguage>
</PropertyGroup>

Expand Down
17 changes: 4 additions & 13 deletions src/fhir-candle/Services/FhirPackageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -419,27 +419,18 @@ public async Task<List<PackageReference>> InstallPackages(

private async ValueTask<(PackageReference, IPackageServer?)> ResolveLatest(string name)
{
ConcurrentBag<(PackageReference pr, IPackageServer server)> latestRecs = new();
List<(PackageReference pr, IPackageServer server)> latestRecs = new();

IEnumerable<System.Threading.Tasks.Task> tasks = _packageClients.Select(async server =>
foreach (IPackageServer server in _packageClients)
{
PackageReference pr = await server.GetLatest(name);
if (pr == PackageReference.None)
{
return;
continue;
}

latestRecs.Add((pr, server));
});

Task t = System.Threading.Tasks.Task.WhenAll(tasks);

try
{
await t.WaitAsync(TimeSpan.FromSeconds(30));
}
catch { }


if (latestRecs.Count == 0)
{
return (PackageReference.None, null);
Expand Down
2 changes: 1 addition & 1 deletion src/fhir-candle/_ForPackages/FhirCiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ private async ValueTask<byte[]> downloadPackage(PackageReference reference, Fhir
{
if (url.StartsWith("HL7/fhir/", StringComparison.OrdinalIgnoreCase))
{
url = "https://build.fhir.org/" + url;
url = "https://build.fhir.org/" + url.Substring(9);
}
else
{
Expand Down

0 comments on commit 9392ac9

Please sign in to comment.