Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDNJS not updating to our latest version #2385

Closed
petertonysmith94 opened this issue May 27, 2024 · 15 comments
Closed

CDNJS not updating to our latest version #2385

petertonysmith94 opened this issue May 27, 2024 · 15 comments
Assignees
Labels
bug Issue is a bug

Comments

@petertonysmith94
Copy link
Contributor

petertonysmith94 commented May 27, 2024

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

@petertonysmith94 petertonysmith94 added the bug Issue is a bug label May 27, 2024
@Torres-ssf
Copy link
Contributor

@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
Copy link
Contributor Author

petertonysmith94 commented May 28, 2024

@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
Copy link
Contributor

@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
Copy link
Contributor Author

@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
Copy link
Contributor

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

@arboleya arboleya added this to the Mainnet milestone Jun 9, 2024
@arboleya arboleya added p2 and removed mainnet labels Jun 9, 2024
@petertonysmith94
Copy link
Contributor Author

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

@Torres-ssf
Copy link
Contributor

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

@petertonysmith94 How come?

@petertonysmith94
Copy link
Contributor Author

petertonysmith94 commented Jun 21, 2024

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
Copy link
Contributor Author

@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

@arboleya
Copy link
Member

Sounds like a plan.

@arboleya arboleya added p1 and removed p2 labels Jul 7, 2024
@petertonysmith94
Copy link
Contributor Author

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
Copy link
Member

Awesome!

@petertonysmith94 petertonysmith94 self-assigned this Jul 15, 2024
@petertonysmith94
Copy link
Contributor Author

Blocked until release of:

Then:

  • Make to changes CDNJS configuration file (fuels.json):
    {
      ...,
      "autoupdate": {
        "source": "npm",
        "target": "fuels",
        "fileMap": [
          {
            "basePath": "dist",
            "files": ["browser.mjs", "browser.min.mjs"]
          }
        ],
        "ignoreVersions": [
          "0.0.0-*"
        ]
      },
      ...,
    }
    (Add minified bundle (browser.min.mjs) and ignoreVersions)

@petertonysmith94
Copy link
Contributor Author

PR is in review

@arboleya arboleya removed this from the 0.x mainnet milestone Jul 19, 2024
@arboleya arboleya removed the p1 label Aug 2, 2024
@petertonysmith94
Copy link
Contributor Author

petertonysmith94 commented Aug 5, 2024

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

We should monitor the release of #2863 to ensure the sync occurs without delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug
Projects
None yet
Development

No branches or pull requests

3 participants