microsoft / FHIR-Converter

Conversion utility to translate legacy data formats into FHIR
MIT License
399 stars 175 forks source link

Microsoft.Health.Common and Microsoft.Health.Logging packages are removed #498

Closed SamShekhovtsov closed 9 months ago

SamShekhovtsov commented 10 months ago

it looks like two packages are entirely removed from the NuGet store:

Microsoft.Health.Common Microsoft.Health.Logging

The project is not compiling any more. Could you please take a look to find any possible solution?

Here is the error that I get:

8.938 /App/FHIR-Converter/src/Microsoft.Health.Fhir.Liquid.Converter/Microsoft.Health.Fhir.Liquid.Converter.csproj : error NU1101: Unable to find package Microsoft.Health.Common. No packages exist with this id in source(s): CI, nuget.org
8.938 /App/FHIR-Converter/src/Microsoft.Health.Fhir.Liquid.Converter/Microsoft.Health.Fhir.Liquid.Converter.csproj : error NU1101: Unable to find package Microsoft.Health.Logging. No packages exist with this id in source(s): CI, nuget.org
9.105   Failed to restore /App/FHIR-Converter/src/Microsoft.Health.Fhir.Liquid.Converter/Microsoft.Health.Fhir.Liquid.Converter.csproj (in 7.27 sec).
10.35 /App/FHIR-Converter/src/Microsoft.Health.Fhir.TemplateManagement/Microsoft.Health.Fhir.TemplateManagement.csproj : error NU1101: Unable to find package Microsoft.Health.Common. No packages exist with this id in source(s): CI, nuget.org
10.35 /App/FHIR-Converter/src/Microsoft.Health.Fhir.Liquid.Converter.Tool/Microsoft.Health.Fhir.Liquid.Converter.Tool.csproj : error NU1101: Unable to find package Microsoft.Health.Common. No packages exist with this id in source(s): CI, nuget.org
10.35 /App/FHIR-Converter/src/Microsoft.Health.Fhir.TemplateManagement/Microsoft.Health.Fhir.TemplateManagement.csproj : error NU1101: Unable to find package Microsoft.Health.Logging. No packages exist with this id in source(s): CI, nuget.org
namalu commented 10 months ago

Can you make sure that your nuget.config file is up to date. The NuGet sources shown in your error seem to be incorrect. They should be nuget.org, Microsoft Health OSS, and Microsoft MedTech OSS.

Let me know if that addresses your issue.

SamShekhovtsov commented 10 months ago

@namalu after updating the nuget.config - I got different errors related to the authentication:

------
 > [build-env 14/15] RUN dotnet restore:
1.547   Determining projects to restore...
8.424   Retrying 'FindPackagesByIdAsync' for source 'https://microsofthealthoss.pkgs.visualstudio.com/601b2fe9-d765-4218-a406-5591448028be/_packaging/c1f064eb-868e-4635-906a-25e6d6420a1b/nuget/v3/flat2/commandlineparser/index.json'.
8.424   Response status code does not indicate success: 401 (Unauthorized - No local versions of package 'commandlineparser'; please provide authentication to access versions from upstream that have not yet been saved to your feed. (DevOps Activity ID: 3D59A5A0-FB67-4CAC-9C36-BDB53C6D1E50)).
namalu commented 10 months ago

@SamShekhovtsov I'm not sure I follow what you are saying. What exactly do you need?

SamShekhovtsov commented 10 months ago

@namalu what I'm saying is that the project was originally declared as an open-source, free to use. What was the reason to put username / password protection on the midway? Who is changing the wheels while already on the halfway?

shabanlushaj commented 10 months ago

@namalu what I'm saying is that the project was originally declared as an open-source, free to use. What was the reason to put username / password protection on the midway? Who is changing the wheels while already on the halfway?

Hey @SamShekhovtsov, I encountered a similar issue. Packages from nuget.org are attempting to resolve from microsoft health pkgs.

Updating nuget.config to use package source mapping fixed the issue.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <config>
        <add key="repositoryPath" value="packages" />
    </config>
    <packageSources>
        <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
        <add key="Microsoft Health OSS" value="https://microsofthealthoss.pkgs.visualstudio.com/FhirServer/_packaging/Public/nuget/v3/index.json" />
    </packageSources>
    <packageSourceMapping>
        <packageSource key="nuget.org">
            <package pattern="*" />
        </packageSource>
        <packageSource key="Microsoft Health OSS">
            <package pattern="Microsoft.Health.*" />
        </packageSource>
    </packageSourceMapping>
</configuration>
SamShekhovtsov commented 10 months ago

@namalu whenever I'm trying to do

$ dotnet restore it throws 401 Unauthorized error. When I paste the target Url of the package into the browser, it requests for the username and password using basic authentication: https://microsofthealthoss.pkgs.visualstudio.com/7621b231-1a7d-4364-935b-2f72b911c43d/_packaging/a60b7c8b-c6ae-4a8e-bd15-a526b603a1f2/nuget/v3/flat2/microsoft.extensions.logging.console/3.1.9/microsoft.extensions.logging.console.3.1.9.nupkg

without the authentication, it returns an error message as stated below:

{
    "$id": "1",
    "innerException": null,
    "message": "No local versions of package 'microsoft.extensions.logging.console'; please provide authentication to access versions from upstream that have not yet been saved to your feed.",
    "typeName": "Microsoft.TeamFoundation.Framework.Server.UnauthorizedRequestException, Microsoft.TeamFoundation.Framework.Server",
    "typeKey": "UnauthorizedRequestException",
    "errorCode": 0,
    "eventId": 3000
}

any clue?

namalu commented 10 months ago

@SamShekhovtsov - Have you tried $ dotnet restore --interactive?

namalu commented 10 months ago

@SamShekhovtsov - Did $ dotnet restore --interactive work for you? I tested this on a machine that I was not logged into, and simply adding --interactive allowed the NuGet packages to restore and did not require any credentials.