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

Allow properties to be excluded from "_clearJenkinsNS"

    • Blue Ocean 1.1

      I have found that https://github.com/jenkinsci/blueocean-plugin/blob/68d5f0bd92a9b0f0ba08e52028dea07031468840/blueocean-core-js/src/js/storage.js#L56 is a big problem if you have different jenkins instances under one same domain or installing new plugins clears all localStorage properties in the ns "jenkins-instance"

      That is not desired for many properties like e.g. DEBUG statements of the logger. Why would I want to clear that preference when I e.g. install a new plugin?

      Expected behaviour for logging and preferences stored in the localStorage are to persist and not be cleared. Only jenkins-instance/installInfo should be cleared.

          [JENKINS-44199] Allow properties to be excluded from "_clearJenkinsNS"

          I fixed the part of the preferences https://github.com/jenkinsci/js-preferences/pull/3 IMO it makes sense to apply the same to logging.

          Thorsten Scherler added a comment - I fixed the part of the preferences https://github.com/jenkinsci/js-preferences/pull/3 IMO it makes sense to apply the same to logging.

          James Dumay added a comment -

          tscherler is this something you want us to fix or are you tracking your changes?

          James Dumay added a comment - tscherler is this something you want us to fix or are you tracking your changes?

          jamesdumay I am not able to read the mail from cliffmeyers but the open point is: whether to move the log preferences out of clearNS or not.

          ...a part of that feedback I am tracking my changes.

          Thorsten Scherler added a comment - jamesdumay I am not able to read the mail from cliffmeyers but the open point is: whether to move the log preferences out of clearNS or not. ...a part of that feedback I am tracking my changes.

          Michael Neale added a comment -

          tscherler would it make sense if you assigned this one to yourself in that case? As this does need fixing.

          Michael Neale added a comment - tscherler would it make sense if you assigned this one to yourself in that case? As this does need fixing.

          Tom FENNELLY added a comment -

          I think the fix for this is fairly simple ... just update js-storage to allow it accept an optional instanceId.

          I published a beta version of this in @jenkins-cd/storage@0.0.7-tf-beta1. Update core-js to use this version and change line 34 of storage.js, passing the Jenkins instanceId, which should come in from BlueOceanConfigStatePreloader.java and then be possible to get it from config.js (in core-js).

          Tom FENNELLY added a comment - I think the fix for this is fairly simple ... just update js-storage to allow it accept an optional instanceId. I published a beta version of this in @jenkins-cd/storage@0.0.7-tf-beta1 . Update core-js to use this version and change line 34 of storage.js , passing the Jenkins instanceId, which should come in from BlueOceanConfigStatePreloader.java and then be possible to get it from config.js (in core-js).

          Tom FENNELLY added a comment -

          Tom FENNELLY added a comment - PR on js-storage: https://github.com/jenkinsci/js-storage/pull/2

          James Dumay added a comment -

          tscherler is this actively being worked on?

          James Dumay added a comment - tscherler is this actively being worked on?

          jamesdumay I do not have time to work on it for a while, since we need to finish our project first. I assigned to cliffmeyers since we pretty much agreed on the base implementation.

          Thorsten Scherler added a comment - jamesdumay I do not have time to work on it for a while, since we need to finish our project first. I assigned to cliffmeyers since we pretty much agreed on the base implementation.

          James Dumay added a comment -

          tscherler no problems mate. Take care

          James Dumay added a comment - tscherler no problems mate. Take care

          James Dumay added a comment -

          Reopen if we start working on it again

          James Dumay added a comment - Reopen if we start working on it again

            Unassigned Unassigned
            tscherler Thorsten Scherler
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: