Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-39646

Properly generate bundles for packages that have multiple top-level modules

    • Blue Ocean 1.2-beta2

      Bundled are generated in a sub optimal way. One side effect is there could be multiple submodules of popular libraries appearing in different bundles. 


      See this doc for a description of the problem(s).

          [JENKINS-39646] Properly generate bundles for packages that have multiple top-level modules

          Tom FENNELLY added a comment - - edited

          There's also another related scenario that needs to be covered here, which is when one or more different versions of a package to be externalized end up in the node_modules of package in node_modules (i.e. npm trying to handle conflicting versions of the package) e.g. /node_modules/@jenkins-cd/blueocean-core-js/node_modules/react/react.js because @jenkins-cd/blueocean-core-js depends on a specific version of react that is not the same as the top level installed version of react ( in /node_modules/react ).

          Tom FENNELLY added a comment - - edited There's also another related scenario that needs to be covered here, which is when one or more different versions of a package to be externalized end up in the node_modules of package in node_modules (i.e. npm trying to handle conflicting versions of the package) e.g. /node_modules/@jenkins-cd/blueocean-core-js/node_modules/react/react.js because @jenkins-cd/blueocean-core-js depends on a specific version of react that is not the same as the top level installed version of react ( in /node_modules/react ).

          Michael Neale added a comment -

          hey tfennelly any news on this and the dependent ticket for chrome tools (given priority of this)?

          Michael Neale added a comment - hey tfennelly any news on this and the dependent ticket for chrome tools (given priority of this)?

          Tom FENNELLY added a comment -

          Some progress made on JENKINS-39657 alright (basic chrome extension created - there was a bit of learning needed on these extensions), but can't effectively do anything on this ticket without first getting JENKINS-39657 to a stage where it can answer the kinds of questions I need it to help give answers to. I think I'm a couple of days awaf from that yet - guessing 2 or 3. This stuff is not going to be done for 1.0, but I'm guessing you already know that.

          I've been away for the last week and it's Paddy's day here today and I'm jetlagged

          Tom FENNELLY added a comment - Some progress made on JENKINS-39657 alright ( basic chrome extension created - there was a bit of learning needed on these extensions), but can't effectively do anything on this ticket without first getting JENKINS-39657 to a stage where it can answer the kinds of questions I need it to help give answers to. I think I'm a couple of days awaf from that yet - guessing 2 or 3. This stuff is not going to be done for 1.0, but I'm guessing you already know that. I've been away for the last week and it's Paddy's day here today and I'm jetlagged

          Michael Neale added a comment -

          tfennelly yeah no worries - happy st pats! I assumed that https://issues.jenkins-ci.org/browse/JENKINS-39657 was the blocking thing still, not sure why I commented here. 

          Michael Neale added a comment - tfennelly yeah no worries - happy st pats! I assumed that https://issues.jenkins-ci.org/browse/JENKINS-39657  was the blocking thing still, not sure why I commented here. 

          Tom FENNELLY added a comment -

          As stated in the very first comment on this ticket ... Please DO NOT change the priority of this ticket.

          I appreciate that things might "seem ok", but imo this issue is a bit more than "technical debt" i.e. it's a fundamental issue with how we are generating bundles and is destined to be a serious issue, especially once we have multiple versions of Blue Ocean out in the wild, with JS bundles generated with different NPM package versions etc.

          It's been a job getting people to take me seriously on this one (e.g. downgrading the priority). Maybe install jenkins-js-modules-chrome-ext in your Chrome browser, open a Blue Ocean instance and take a look at the number of errors and warnings. These are pretty much all relating to this bug in the bundle generation.

          Also ... the bundles are "fatter" than they need to be because of this.

          As an example from https://ci.blueocean.io (140+ errors detected in dashboard and personalization bundles) ...

          Tom FENNELLY added a comment - As stated in the very first comment on this ticket ... Please DO NOT change the priority of this ticket. I appreciate that things might "seem ok", but imo this issue is a bit more than "technical debt" i.e. it's a fundamental issue with how we are generating bundles and is destined to be a serious issue, especially once we have multiple versions of Blue Ocean out in the wild, with JS bundles generated with different NPM package versions etc. It's been a job getting people to take me seriously on this one (e.g. downgrading the priority). Maybe install jenkins-js-modules-chrome-ext in your Chrome browser, open a Blue Ocean instance and take a look at the number of errors and warnings. These are pretty much all relating to this bug in the bundle generation. Also ... the bundles are "fatter" than they need to be because of this. As an example from https://ci.blueocean.io (140+ errors detected in dashboard and personalization bundles) ...

          Michael Neale added a comment -

          Bringing this up for discussion at next hangout.. 

          Michael Neale added a comment - Bringing this up for discussion at next hangout.. 

          James Dumay added a comment -

          michaelneale still needed on the board?

          James Dumay added a comment - michaelneale still needed on the board?

          Tom FENNELLY added a comment -

          I'm going to write up a more detailed and structured doc around all of this wrt what's wrong today with how we generate an use bundles and what I think we need to do to put it right (or more right than it is).

          There are a few fundamental things we are doing wrong imo (yes, my fault). I'd really like to put those things right before we try doing things like what's in jenkinsci/js-builder/pull/19. How we allow exports of modules today without properly generating a "dependency bundle" (e.g. how we export some modules in blueocean.js in the blueocean-web plugin) is fundamentally wrong and is eventually going to break badly ... just a matter of time!! jenkinsci/js-builder/pull/19 would very likely make that situation a lot worse imo + make it harder to fix. So, I'm firmly of the opinion that we fix how we generate bundles etc first, and then come back and see how we can make jenkinsci/js-builder/pull/19 work where it'll be on more solid foundations.

          Tom FENNELLY added a comment - I'm going to write up a more detailed and structured doc around all of this wrt what's wrong today with how we generate an use bundles and what I think we need to do to put it right (or more right than it is). There are a few fundamental things we are doing wrong imo (yes, my fault). I'd really like to put those things right before we try doing things like what's in jenkinsci/js-builder/pull/19 . How we allow exports of modules today without properly generating a "dependency bundle" (e.g. how we export some modules in blueocean.js in the blueocean-web plugin) is fundamentally wrong and is eventually going to break badly ... just a matter of time!! jenkinsci/js-builder/pull/19 would very likely make that situation a lot worse imo + make it harder to fix. So, I'm firmly of the opinion that we fix how we generate bundles etc first, and then come back and see how we can make jenkinsci/js-builder/pull/19 work where it'll be on more solid foundations.

          Tom FENNELLY added a comment -

          I added the doc. It's linked to in the main description.

          Tom FENNELLY added a comment - I added the doc. It's linked to in the main description.

          Tom FENNELLY added a comment -

          jamesdumay I think we can close this a "Won't Do" .

          Tom FENNELLY added a comment - jamesdumay I think we can close this a "Won't Do" .

            Unassigned Unassigned
            tfennelly Tom FENNELLY
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: