CDNJS not updating to our latest version
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
- Upload our distribution to GitHub releases assets.
- Once released, alter CDNJS package to autoupdate from GitHub, rather than NPM.
- https://github.com/cdnjs/packages/blob/master/packages/f/fuels.json
@petertonysmith94 It seems the problem is happening because their last update sync happened on May 14:
0.86.0 got released on the same date:
So I reckon their update/sync happened just before our release.
@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 the history for the last sync looks off to me, it appears to occur multiple times daily and then just stop.
It appears the
synctheir 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.
@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.
I get it @petertonysmith94, makes sense. It is worth investigating.
I have a hunch that this issue will be alleviated once we disable publishing on every E2E test (#2489).
I have a hunch that this issue will be alleviated once we disable publishing on every E2E test (#2489).
@petertonysmith94 How come?
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).
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?
@arboleya Would be good to get your 2 cents on the above proposal?
TLDR:
- Add our distributed package to the GitHub release
- Set CDNJS to auto update from NPM to GitHub
Sounds like a plan.
Found an undocumented ignoreVersions argument with the autoupdate feature (will add this to our CDNJS config):
- https://github.com/cdnjs/packages/blob/3b586a540b9689bae47547236ba3e4da9ffbc8f2/packages/r/react.json#L36
Planning on rolling this out with the following:
- https://github.com/FuelLabs/fuels-ts/issues/1728
Two birds one stone :)
Awesome!
Blocked until release of:
- https://github.com/FuelLabs/fuels-ts/pull/2762
Then:
- Make to changes CDNJS configuration file (fuels.json):
(Add minified bundle ({ ..., "autoupdate": { "source": "npm", "target": "fuels", "fileMap": [ { "basePath": "dist", "files": ["browser.mjs", "browser.min.mjs"] } ], "ignoreVersions": [ "0.0.0-*" ] }, ..., }browser.min.mjs) andignoreVersions)
PR is in review
- https://github.com/cdnjs/packages/pull/1852
Will make this as complete as CDNJS configuration has now been merged:
- https://github.com/cdnjs/packages/pull/1852
We should monitor the release of https://github.com/FuelLabs/fuels-ts/pull/2863 to ensure the sync occurs without delay.