NuGet / NuGetGallery

NuGet Gallery is a package repository that powers https://www.nuget.org. Use this repo for reporting NuGet.org issues.
https://www.nuget.org/
Apache License 2.0
1.55k stars 641 forks source link

Catalog resource is unavailable in China #4949

Open joelverhagen opened 7 years ago

joelverhagen commented 7 years ago

Today, the catalog HTTP API is available globally under the following URL: https://api.nuget.org/v3/catalog0/index.json

This URL can be looked up in the global V3 service index using the Catalog/3.0.0 @type value: https://api.nuget.org/v3/index.json

Unfortunately, this is not available in China. The following response is returned when hitting the catalog index:

<Error>
  <Code>ResourceNotFound</Code>
  <Message>
    The specified resource does not exist. RequestId:8e18a7af-001e-001b-1edd-54f8b9000000 Time:2017-11-03T19:53:38.6607730Z
  </Message>
</Error>

We should make this resource available in China, now that is it documented publicly.

This URL works just fine anywhere else in the world. Note some hacky workarounds exist, but it's not an ideal scenario.

Also, if you are in China and need access to the catalog, please upvote this issue.

scottbommarito commented 6 years ago

Note: China users can access the catalog if they use the global CDN directly: https://az636225.vo.msecnd.net/v3-catalog0/index.json

EDIT: this is incorrect, please ignore--this is our integration environment (int.nugettest.org) and not our production environment!

joelverhagen commented 6 years ago

Note: China users can access the catalog if they use the global CDN directly: https://az636225.vo.msecnd.net/v3-catalog0/index.json

This is INT catalog. PROD catalog has api.nuget.org baked in.

RuanXinyu commented 6 years ago

I found the content in https://api.nuget.org/v3/catalog0/index.json is 3 times larger than the content in https://az636225.vo.msecnd.net/v3-catalog0/index.json.

joelverhagen commented 6 years ago

@RuanXinyu, yes, the second URL you provide is our INT (staging) environment used for testing our new code before going to production.

The catalog at https://api.nuget.org/v3/catalog0/index.json is the officially supported, production catalog index URL.

There are many more packages on our production environment than on INT.