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

Regression: core-js config.js forces to have windows.location

    Details

    • Epic Link:
    • Sprint:
      Blue Ocean 1.4 - beta 1
    • Similar Issues:

      Description

      https://github.com/jenkinsci/blueocean-plugin/blame/release/1.3/blueocean-core-js/src/js/config.js#L13

      (window.location.href.split('?')[1] || '').split('&')
      

      window.location in unit testing is normally undefined and can be until href.

      our unit tests are failing now with

      /home/thorsten/opt/src/cloudbees/operations-center-all/bluesteel/bluesteel-cjoc/node_modules/@jenkins-cd/blueocean-core-js/dist/js/config.js:19
      (window.location.href.split('?')[1] || '').split('&').forEach(function (p) {
                      ^
      
      TypeError: Cannot read property 'href' of undefined
          at Object.<anonymous> (/source/js/config.js:13:2)
      

        Attachments

          Activity

          Hide
          jamesdumay James Dumay added a comment -

          Alvaro Lobato Michael Neale is this needed for release?

          Show
          jamesdumay James Dumay added a comment - Alvaro Lobato Michael Neale is this needed for release?
          Hide
          tscherler Thorsten Scherler added a comment -

          James Dumay we are blocked in updating/sync our deps to the ones coming in the release. Since the bug is in the 1.3 release we need this otherwise our release is blocked or we need to ship with 1.2

          Show
          tscherler Thorsten Scherler added a comment - James Dumay we are blocked in updating/sync our deps to the ones coming in the release. Since the bug is in the 1.3 release we need this otherwise our release is blocked or we need to ship with 1.2
          Hide
          jamesdumay James Dumay added a comment -

          Thorsten Scherler is this in progress or in review? I saw a PR fly by but I don't know what state this is in.

          Show
          jamesdumay James Dumay added a comment - Thorsten Scherler is this in progress or in review? I saw a PR fly by but I don't know what state this is in.
          Hide
          kshultz Karl Shultz added a comment -

          Testing notes not required, because this issue was uncovered as a result of existing unit tests.

          Show
          kshultz Karl Shultz added a comment - Testing notes not required, because this issue was uncovered as a result of existing unit tests.

            People

            • Assignee:
              tscherler Thorsten Scherler
              Reporter:
              tscherler Thorsten Scherler
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: