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

Improved importing/requiring of modules across bundles

    • 1.0-m12, 1.0-pre-beta-1, 1.0-beta-1

      E.g. to accommodate the how we need control over how react and react-dom are loaded.

      tfennelly assigning to you for now but I intend to reach out tomorrow so we can work this together. We discussed a workaround for this last week but I was not successful after following the steps you'd provided. Could be something I've missed though. If it's not, let's try to fix together, with my final task being to do a write-up in a wiki about the steps needed to work around this problem.

      Steps followed:

      1. Add 'react-addons-css-transition-group' to init.jsx in blueocean-web
      2. In js-extensions/@jenkins-cd/subs/extensions-bundle.js, update the createBundle function near the end
      3. Build a new js-extensions
      4. npm install new js-extensions in blueocean-web and blueocean-personalization
      5. Re-run gulp bundle for both modules

          [JENKINS-37006] Improved importing/requiring of modules across bundles

          Cliff Meyers created issue -
          Cliff Meyers made changes -
          Epic Link New: JENKINS-35749 [ 171790 ]
          Cliff Meyers made changes -
          Link New: This issue blocks JENKINS-37007 [ JENKINS-37007 ]
          Cliff Meyers made changes -
          Description Original: [~tfennelly] assigning to you for now but I intend to reach out tomorrow so we can work this together. We discussed a workaround for this last week but I was not successful after following the steps you'd provided. Could be something I've missed though. If it's not, let's try to fix together, with the final task being to do a write-up in a wiki about the steps needed to work around this problem.

          Steps followed:
          # Add 'react-addons-css-transition-group' to init.jsx in blueocean-web
          # In js-extensions/@jenkins-cd/subs/extensions-bundle.js, update the createBundle function near the end
          # Build a new js-extensions
          # npm install new js-extensions in blueocean-web and blueocean-personalization
          New: [~tfennelly] assigning to you for now but I intend to reach out tomorrow so we can work this together. We discussed a workaround for this last week but I was not successful after following the steps you'd provided. Could be something I've missed though. If it's not, let's try to fix together, with the final task being to do a write-up in a wiki about the steps needed to work around this problem.

          Steps followed:
          # Add 'react-addons-css-transition-group' to init.jsx in blueocean-web
          # In js-extensions/@jenkins-cd/subs/extensions-bundle.js, update the createBundle function near the end
          # Build a new js-extensions
          # npm install new js-extensions in blueocean-web and blueocean-personalization
          # Re-run gulp bundle for both modules

          Cliff Meyers added a comment - - edited

          feature branch / diff that shows changes made so far:
          https://github.com/jenkinsci/blueocean-plugin/compare/feature/JENKINS-35840-35781-more-favoriting...feature/JENKINS-37007-favorites-animations

          Please note that checking out this code and running as-is won't work since a new js-extensions hasn't been published. I had been building and manually npm installing it in my local testing but it did not resolve the error.

          Cliff Meyers added a comment - - edited feature branch / diff that shows changes made so far: https://github.com/jenkinsci/blueocean-plugin/compare/feature/JENKINS-35840-35781-more-favoriting...feature/JENKINS-37007-favorites-animations Please note that checking out this code and running as-is won't work since a new js-extensions hasn't been published. I had been building and manually npm installing it in my local testing but it did not resolve the error.
          Cliff Meyers made changes -
          Description Original: [~tfennelly] assigning to you for now but I intend to reach out tomorrow so we can work this together. We discussed a workaround for this last week but I was not successful after following the steps you'd provided. Could be something I've missed though. If it's not, let's try to fix together, with the final task being to do a write-up in a wiki about the steps needed to work around this problem.

          Steps followed:
          # Add 'react-addons-css-transition-group' to init.jsx in blueocean-web
          # In js-extensions/@jenkins-cd/subs/extensions-bundle.js, update the createBundle function near the end
          # Build a new js-extensions
          # npm install new js-extensions in blueocean-web and blueocean-personalization
          # Re-run gulp bundle for both modules
          New: [~tfennelly] assigning to you for now but I intend to reach out tomorrow so we can work this together. We discussed a workaround for this last week but I was not successful after following the steps you'd provided. Could be something I've missed though. If it's not, let's try to fix together, with my final task being to do a write-up in a wiki about the steps needed to work around this problem.

          Steps followed:
          # Add 'react-addons-css-transition-group' to init.jsx in blueocean-web
          # In js-extensions/@jenkins-cd/subs/extensions-bundle.js, update the createBundle function near the end
          # Build a new js-extensions
          # npm install new js-extensions in blueocean-web and blueocean-personalization
          # Re-run gulp bundle for both modules

          Michael Neale added a comment -

          Is this the duplicate react instances? Is there a bundling of a version of react due to a version change of a transitive dependency? A missin extDep entry?

          Michael Neale added a comment - Is this the duplicate react instances? Is there a bundling of a version of react due to a version change of a transitive dependency? A missin extDep entry?

          Cliff Meyers added a comment -

          Yes, same old error. From discussions w/ Tom, the extDep thing won't actually resolve this issue. We are adding a new dep which depends on React, and I think that it's getting bundled with the personalization module instead of being provided by blueocean-web. Tom said he'd have a look in the morning tomorrow, and when I'm online we'll touch base and get this sorted. If there's a process to document, I will make sure we put it somewhere.

          Cliff Meyers added a comment - Yes, same old error. From discussions w/ Tom, the extDep thing won't actually resolve this issue. We are adding a new dep which depends on React, and I think that it's getting bundled with the personalization module instead of being provided by blueocean-web. Tom said he'd have a look in the morning tomorrow, and when I'm online we'll touch base and get this sorted. If there's a process to document, I will make sure we put it somewhere.

          Tom FENNELLY added a comment -

          Hey Cliff ... is there a way we can create a test branch that breaks for this? I was going to try create one myself from the diff link you provided, but probably no point.

          Tom FENNELLY added a comment - Hey Cliff ... is there a way we can create a test branch that breaks for this? I was going to try create one myself from the diff link you provided, but probably no point.
          Tom FENNELLY made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

            tfennelly Tom FENNELLY
            cliffmeyers Cliff Meyers
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: