Replies: 35 comments 69 replies
-
Hey @monishcm We are saying a huge drop of incoming events. Is that an expected change due to the optimizations you are making? |
Beta Was this translation helpful? Give feedback.
-
When building and maintaining a replica, I would expect to first paginate through the This approach worked great with the old endpoints. The old What is the recommended approach to do a bulk download and then transition to fetching updates? Is there a supported endpoint to check the current sequence value? |
Beta Was this translation helpful? Give feedback.
-
When I skimmed this initially I was under the impression that there were no breaking changes here if already using
The sequence numbers also seem to have jumped again. Last month the sequence numbers were around the The new API is definitely way better though and I'm sure a huge operational saving there, congrats on shipping these improvements! |
Beta Was this translation helpful? Give feedback.
-
The suggested (new) endpoints now return 401’s?
{
"message": "This API is currently unavailable. Please see this for more information: https://github.blog/changelog/2025-02-27-changes-and-deprecation-notice-for-npm-replication-apis"
} |
Beta Was this translation helpful? Give feedback.
-
Hi there all! npm engineer here, we had to disable the new opt-in replication api for the weekend to investigate an incident that occurred this morning. We will be able to take a further look at it monday morning, thanks for your understanding! ❤️ |
Beta Was this translation helpful? Give feedback.
-
Hi @shmam, Are there any updates on this? I still can't use the APIs with the header. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
As we are temporarily falling back to old replication feed here, any workaround for the |
Beta Was this translation helpful? Give feedback.
-
Is it just for me or are all the replication feed ( Tried: |
Beta Was this translation helpful? Give feedback.
-
Seems like endpoints are back up, but as mentioned here by @jvandenaardweg seems like something is wrong with the seq ids. @shmam do you have any details about this? |
Beta Was this translation helpful? Give feedback.
-
Any update @shmam? How long will it take to fix this? |
Beta Was this translation helpful? Give feedback.
-
Hi all! We've re-enabled our new replication api after implementing some repair items from the previous incident. Please resume using it by adding the We've also resumed the brownout schedule for the old replication api. We are still investigating an issue with this legacy api and working to restore full access to that when the brownout schedule is not in effect. Thank you again for your patience. |
Beta Was this translation helpful? Give feedback.
-
It looks like there's something wrong with the
But if I try to go to a later page with a request like
It's even worse if I pick a later
Am I doing something wrong or is there something broken with the |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm getting "BadRequest" while using the "sorted" parameter in the _all_docs endpoint. |
Beta Was this translation helpful? Give feedback.
-
The last seq of the old address is 41274032. |
Beta Was this translation helpful? Give feedback.
-
Why is registry.npmjs.org telling us by an npm-notice response header that https://registry.npmjs.org is deprecated and to use replicate.npmjs.com instead? Is registry.npmjs.org going away? Is it not still the official registry endpoint? See npm-notice: This endpoint is deprecated. Use https://replicate.npmjs.com instead.
|
Beta Was this translation helpful? Give feedback.
-
Is the |
Beta Was this translation helpful? Give feedback.
-
I'm trying to catch up from sequence ID ~40,000,000 but there are events for package's that return 404.
There's no later deleted: true message, I'm not sure what to do with these packages. I don't want to just skip them, I'm worried that when I'm caught up and checking just-published packages there will be a race between the replica and registry APIs and I might get 404s. |
Beta Was this translation helpful? Give feedback.
-
I have observed that the |
Beta Was this translation helpful? Give feedback.
-
Why is seq one moment over 4 million and the next over 6 million? |
Beta Was this translation helpful? Give feedback.
-
I used to have actual CouchDB replication (into CouchDB!) set up and struggled for days to find a configuration that actually worked and did not error all the time. Now thanks to this change, I need to do the same trial and error once again. I would love to have actual documentation for the replication settings somewhere. In addition, I don't see the reason for removing the include_docs parameter. This just leads to WAY more spam on the GET metadata endpoint. Maybe I am missing the point of this change, but to me it seems that actual replication is made much more difficult this way. Edit: I'm also using PouchDB and so far that has been a bad experience. All the deprecated parameters require tuning the config, and if you get anything wrong you get a very helpful |
Beta Was this translation helpful? Give feedback.
-
How are replicas meant to avoid race conditions when fetching pacuments from changes?
|
Beta Was this translation helpful? Give feedback.
-
Is there currently an issue with the service? When calling |
Beta Was this translation helpful? Give feedback.
-
As |
Beta Was this translation helpful? Give feedback.
-
Question, how are we suppose to use the I assume the When I noticed this I started logging the mismatches, below are just a few. There are thousands of these happening. "processed revision" is the revision from https://registry.npmjs.com/, the "input revision" is from https://replicate.npmjs.com/ . Even after a few hours, the registry does not reflect the changes revision.
There's not only a mismatch in the number part, but sometimes even the hash part does not match. Here is just one example of the many i see in my logs:
|
Beta Was this translation helpful? Give feedback.
-
Based on the above, the Root(
What is going on? which api should we use to fetch this data? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the update. We'll ensure our systems use the new endpoints with the opt-in header before March 18, and fully switch over ahead of the May 29 deprecation deadline. |
Beta Was this translation helpful? Give feedback.
-
Something appears to be seriously wrong now. Because of the seq change mentioned in https://github.com/orgs/community/discussions/152515#discussioncomment-13053455, I tried to rerun our replication from scratch, and going from seq 0 up to 42347999, I received only around 260000 changes, which is less than 10% of all the packages. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the detailed rundown @monishcm . I wanted to confirm a few things:
|
Beta Was this translation helpful? Give feedback.
-
So we just finished the last brownout testing phase, and last night just after midnight UTC (Roughly 00:15), our systems didn't get any new changes from Any idea what happened? It didn't seem to be an issue on our end. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Overview
As part of our ongoing improvements, we are making changes to our replication API services. This is to ensure availability and performance of our feeds. Moving forward, only a limited set of API endpoints will be supported. Additionally, requests to
skimdb.npmjs.com
will now be redirected toreplicate.npmjs.com
via a301 Moved Permanently
response. All other endpoints will be deprecated and return a404 Not Found
response.To facilitate a seamless transition, the new endpoints will be available starting
Tuesday, March 18, 2025 (12:00 UTC)
, operating in parallel with the existing endpoints. The existing endpoints will be fully deprecated onThursday, May 29, 2025 (12:00 UTC)
. During the transition period, you may access the new endpoints by including thenpm-replication-opt-in
header with the valuetrue
in your requests (wherein they will be ignored thereafter)Supported Endpoints
Going forward, the following API endpoints will be supported (with some limitations):
GET https://replicate.npmjs.com/registry/_changes
GET/POST https://replicate.npmjs.com/registry/_all_docs
HEAD/GET https://replicate.npmjs.com/
Changes and Limitations
Each supported endpoint will now have a limited set of supported parameters. Requests using unsupported parameters will not function as expected.
_changes
EndpointThe
_changes
endpoint will continue to function for paginating through package changes. The following parameters will be supported:Supported Parameters
doc_ids
descending
last-event-id
(andLast-Event-ID
header)limit
since
Deprecated Parameters
The following parameters will no longer be supported:
conflicts
feed
filter
heartbeat
include_docs
attachments
att_encoding_info
style
timeout
view
seq_interval
Behavioral Changes
doc_ids
will now behave as iffilter=_doc_ids
is also supplied.feed
will behave as ifnormal
was passed.style
will behave as ifmain_only
was passed._all_docs
EndpointThe
_all_docs
endpoint will continue to support bothGET
andPOST
methods for paginating through packages in the registry.Supported Parameters
descending
endkey
,end_key
,endkey_docid
,end_key_doc_id
startkey
,start_key
,startkey_docid
,start_key_doc_id
inclusive_end
key
keys
limit
Deprecated Parameters
The following parameters will no longer be supported:
conflicts
group
group_level
include_docs
attachments
att_encoding_info
reduce
stable
stale
update
update_seq
sorted
(The results are always sorted)skip
(Usestartkey
,start_key
,startkey_docid
,start_key_doc_id
instead)Root Endpoint (
/
)The root endpoint will continue to supply the following parameters in JSON output:
db_name
engine
doc_count
update_seq
Important Notes
include_docs
Deprecation and Direct packument AccessThe
include_docs
parameter will not be supported in any endpoint. Users should instead fetch package metadata directly fromhttps://registry.npmjs.org/<package-name>
to ensure consistency.Note: Users should transition from fetching package metadata from
https://replicate.npmjs.com/
tohttps://registry.npmjs.org/<package-name>
.https://replicate.npmjs.com/
will no longer be supported for fetching packuments.limit
ParameterThe
limit
parameter will have a default value of 1000 and a maximum value of 10000 across all endpoints.Streaming Responses
Support for streaming responses via
feed=longpoll
,feed=continuous
, andfeed=eventsource
will be removed. Users should implement manual pagination using sequence IDs via thesince
parameter.Migration Steps
https://replicate.npmjs.com/registry/
instead ofskimdb.npmjs.com/
.https://registry.npmjs.org/<package_name>
instead ofinclude_docs
for retrieving package metadata.since
.limit
values in requests adhere to the new default (1000) and maximum (10000) constraints.Timelines for the migration
The newly migrated endpoints will be accessible beginning
Tuesday, March 18, 2025 (12:00 UTC)
. These endpoints will operate concurrently with the existing endpoints until the latter are deprecated onThursday, May 29, 2025 (12:00 UTC)
. To access the new endpoints, please include thenpm-replication-opt-in
header with the valuetrue
in your requests (the header will be ignored thereafter).Brownout Phases for Testing
A series of brownout phases will begin on
Wednesday, April 02, 2025 (12:00 UTC)
, and continue until the complete deprecation of the old endpoints onThursday, May 29 , 2025 (12:00 UTC)
. During this period, deprecated endpoints will be intermittently blocked. To avoid disruptions, you can access the new endpoints by including thenpm-replication-opt-in
header with the valuetrue
in your requests (untilThursday, May 29, 2025 (12:00 UTC)
wherein the header will be ignored thereafter).The Brownout is phased into 3 blocks.
The planned schedule is as follows:
Phase 1:
April 2 to April 22 (21 days)
- Recurring periods of2 hours
of unavailability from12:00 UTC
, followed by2 hours
of availabilityPhase 2:
April 23 to May 13 (21 days)
- Recurring periods of4 hours
of unavailability from12:00 UTC
, followed by2 hours
of availabilityPhase 3:
May 14 to May 29 (16 days)
- Recurring periods of10 hours
of unavailability from12:00 UTC
, followed by2 hours
of availabilityWe strongly recommend using this transition period to test your updated replication implementations and provide feedback.
Additional Support
For more details, join the discussion in this post (literally this post 😄). This is the go-to place for questions and comments. If you have specific questions or need assistance, please reach out to our support team.
Thank you for your cooperation as we work to enhance the replication API experience!
Beta Was this translation helpful? Give feedback.
All reactions