FuelLabs / fuels-ts

Fuel Network Typescript SDK
https://docs.fuel.network/docs/fuels-ts/
Apache License 2.0
44.26k stars 1.34k forks source link

CDNJS not updating to our latest version #2385

Closed petertonysmith94 closed 1 month ago

petertonysmith94 commented 3 months ago

Summary

We currently have fuels in CDNJS which is lagging being our actual version (see investigation).

As we publish preview versions to NPM, CDNJS struggles to keep up with the backlog of versions. The proposed solution is to switch over to autoupdate from GItHub release assets.

Solution

Torres-ssf commented 3 months ago

@petertonysmith94 It seems the problem is happening because their last update sync happened on May 14:

Screenshot 2024-05-27 at 12 53 57

0.86.0 got released on the same date:

Screenshot 2024-05-27 at 12 53 15

So I reckon their update/sync happened just before our release.

petertonysmith94 commented 3 months ago

@Torres-ssf the history for the last sync looks off to me, it appears to occur multiple times daily and then just stop.

It appears the sync their end is failing.

It also appears that it's now onto 0.87.0.

Torres-ssf commented 3 months ago

@Torres-ssf the history for the last sync looks off to me, it appears to occur multiple times daily and then just stop.

It appears the sync their end is failing.

It also appears that it's now onto 0.87.0.

@petertonysmith94 You're right. This sync timestamp appears unrelated to their updates.

But the fact that they have just released 0.87.0 is an indication that the problem is not on our side.

petertonysmith94 commented 3 months ago

@Torres-ssf I suppose for me, they're churning though a lot of redundant releases (therefore not picking up our "official" releases). If their throughput can't keep up with all our published releases, I believe it is our problem.

Torres-ssf commented 3 months ago

I get it @petertonysmith94, makes sense. It is worth investigating.

petertonysmith94 commented 2 months ago

I have a hunch that this issue will be alleviated once we disable publishing on every E2E test (#2489).

Torres-ssf commented 2 months ago

I have a hunch that this issue will be alleviated once we disable publishing on every E2E test (#2489).

@petertonysmith94 How come?

petertonysmith94 commented 2 months ago

I have a hunch that this issue will be alleviated once we disable publishing on every E2E test (#2489).

@petertonysmith94 How come?

@Torres-ssf my hunch was wrong.

I grabbed the processing times from the CDN logs and cross referenced with our GitHub releases times. Although the publishing on every E2E test did have a significant impact - it appears that we were always lagging in our synchronisation (from release on GitHub to syncing with CDNJS).

image

I would say a good solution would be to add our distribution files to the GitHub release, and set the autoupdate for CDNJS to GitHub. This would minimise the amount of "noise" that the CDNJS worker has to churn through before getting to our official release - therefore reducing the sync time.

Anyone have any thoughts?

petertonysmith94 commented 2 months ago

@arboleya Would be good to get your 2 cents on the above proposal?

TLDR:

arboleya commented 2 months ago

Sounds like a plan.

petertonysmith94 commented 1 month ago

Found an undocumented ignoreVersions argument with the autoupdate feature (will add this to our CDNJS config):

Planning on rolling this out with the following:

Two birds one stone :)

arboleya commented 1 month ago

Awesome!

petertonysmith94 commented 1 month ago

Blocked until release of:

Then:

petertonysmith94 commented 1 month ago

PR is in review

petertonysmith94 commented 1 month ago

Will make this as complete as CDNJS configuration has now been merged:

We should monitor the release of https://github.com/FuelLabs/fuels-ts/pull/2863 to ensure the sync occurs without delay.