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

Modifying Folder configuration removes all config files

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • Jenkins ver. 2.32.1
      Config File Provider Plugin v2.15.5

      On modifying folder configuration, all config file of the folder are removed.

      Steps to reproduce:

      1. Create a new folder
      2. Add a new config file (config-file-provider-plugin)
      3. Rename the folder or change any other field
      4. Check config files, there is no file

      I have checked the config.file on the file system, <configs class="sorted-set"> tag has no element after modifying configuration

          [JENKINS-42389] Modifying Folder configuration removes all config files

          Sadiq Khoja created issue -
          Sadiq Khoja made changes -
          Summary Original: Enabling "project-based security" deletes all config files New: Modifying Folder configuration removes all config files
          Sadiq Khoja made changes -
          Labels Original: config-file-provider matrix-auth New: config-file-provider
          Sadiq Khoja made changes -
          Environment Original: Jenkins ver. 2.32.1
          Matrix Authorization Strategy Plugin v1.4
          Matrix Project Plugin v1.8
          New: Jenkins ver. 2.32.1
          Config File Provider Plugin v2.15.5
          Sadiq Khoja made changes -
          Component/s New: config-file-provider-plugin [ 16140 ]
          Component/s Original: matrix-auth-plugin [ 18131 ]
          Sadiq Khoja made changes -
          Description Original: On enabling "project-based security" all config file of the job are removed.

          Steps to reproduce:
          # Create a new folder
          # Add a new config file (config-file-provider-plugin)
          # Now enable "project-based security" for the folder
          # Check config files, there is no file

          I have checked the config.file on the file system, <configs class="sorted-set"> tag has no element after enabling "project-based security"
          New: On modifying folder configuration, all config file of the folder are removed.

          Steps to reproduce:
          # Create a new folder
          # Add a new config file (config-file-provider-plugin)
          # Rename the folder or change any other field
          # Check config files, there is no file

          I have checked the config.file on the file system, <configs class="sorted-set"> tag has no element after modifying configuration

          Evaristo Gutierrez added a comment - - edited

          imod It's not actually needed to change anything, just opening the configuration page and saving again, makes this happen.

          This automated test reproduces the issue:

          @Test
              public void sameFolderPropertyAfterConfiguration() throws Exception {
                  Folder f1 = createFolder();
                  ConfigFileStore store = getStore(f1);
          
                  r.configRoundtrip(f1);
          
                  assertThat(store, Matchers.is(getStore(f1)));
              }
          

          I think it's related with AbstractFolder because the properties are not being sent in the json after configuring.

          I am not sure of why though. Maybe they are "invisible" properties?

          Evaristo Gutierrez added a comment - - edited imod It's not actually needed to change anything, just opening the configuration page and saving again, makes this happen. This automated test reproduces the issue: @Test public void sameFolderPropertyAfterConfiguration() throws Exception { Folder f1 = createFolder(); ConfigFileStore store = getStore(f1); r.configRoundtrip(f1); assertThat(store, Matchers.is(getStore(f1))); } I think it's related with AbstractFolder because the properties are not being sent in the json after configuring. I am not sure of why though. Maybe they are "invisible" properties?
          Dominik Bartholdi made changes -
          Assignee New: Dominik Bartholdi [ imod ]

          Code changed in jenkins
          User: imod
          Path:
          src/test/java/org/jenkinsci/plugins/configfiles/folder/FolderConfigFileActionTest.java
          http://jenkins-ci.org/commit/config-file-provider-plugin/679be2283e7bf812745d6278edcfdf5533a0b4d9
          Log:
          JENKINS-42389 add test case to demonstrate problem

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: imod Path: src/test/java/org/jenkinsci/plugins/configfiles/folder/FolderConfigFileActionTest.java http://jenkins-ci.org/commit/config-file-provider-plugin/679be2283e7bf812745d6278edcfdf5533a0b4d9 Log: JENKINS-42389 add test case to demonstrate problem

          egutierrez I also asked on the ML for some hints on how to resolve this issue - unfortunate with no luck  

          ...maybe you could ask around internally?

          Dominik Bartholdi added a comment - egutierrez I also asked on the ML for some hints on how to resolve this issue - unfortunate with no luck   ...maybe you could ask around internally?

            imod Dominik Bartholdi
            sadiqkhoja Sadiq Khoja
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: