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

Modifying Folder configuration removes all config files

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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

        Attachments

          Issue Links

            Activity

            Hide
            egutierrez Evaristo Gutierrez added a comment - - edited

            Dominik Bartholdi 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?

            Show
            egutierrez Evaristo Gutierrez added a comment - - edited Dominik Bartholdi 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?
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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
            Hide
            imod Dominik Bartholdi added a comment -

            Evaristo Gutierrez 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?

            Show
            imod Dominik Bartholdi added a comment - Evaristo Gutierrez 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?
            Hide
            egutierrez Evaristo Gutierrez added a comment -

            Dominik Bartholdi sure, let me try and will come back to you.

            Show
            egutierrez Evaristo Gutierrez added a comment - Dominik Bartholdi sure, let me try and will come back to you.
            Hide
            jglick Jesse Glick added a comment -

            My suggestion on the list was to make FolderConfigFileProperty a ReconfigurableDescribable.

            Show
            jglick Jesse Glick added a comment - My suggestion on the list was to make FolderConfigFileProperty  a ReconfigurableDescribable .
            Hide
            imod Dominik Bartholdi added a comment -

            hmm, strange that never made to my mailbox  - thanks!

            Show
            imod Dominik Bartholdi added a comment - hmm, strange that never made to my mailbox  - thanks!
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: imod
            Path:
            src/main/java/org/jenkinsci/plugins/configfiles/folder/FolderConfigFileProperty.java
            http://jenkins-ci.org/commit/config-file-provider-plugin/3a4282fe3ead6de1de1d3b8034646083f1dfc380
            Log:
            [FIXED JENKINS-42389] implement ReconfigurableDescribable to fix data lost when folder gets updated

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: imod Path: src/main/java/org/jenkinsci/plugins/configfiles/folder/FolderConfigFileProperty.java http://jenkins-ci.org/commit/config-file-provider-plugin/3a4282fe3ead6de1de1d3b8034646083f1dfc380 Log: [FIXED JENKINS-42389] implement ReconfigurableDescribable to fix data lost when folder gets updated
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: imod
            Path:
            src/main/java/org/jenkinsci/plugins/configfiles/folder/FolderConfigFileProperty.java
            src/test/java/org/jenkinsci/plugins/configfiles/folder/FolderConfigFileActionTest.java
            http://jenkins-ci.org/commit/config-file-provider-plugin/f7206995991ee2cbbc2dca750aee2290609f994f
            Log:
            Merge branch 'JENKINS-42389'

            Compare: https://github.com/jenkinsci/config-file-provider-plugin/compare/dbda7551cec1...f7206995991e

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: imod Path: src/main/java/org/jenkinsci/plugins/configfiles/folder/FolderConfigFileProperty.java src/test/java/org/jenkinsci/plugins/configfiles/folder/FolderConfigFileActionTest.java http://jenkins-ci.org/commit/config-file-provider-plugin/f7206995991ee2cbbc2dca750aee2290609f994f Log: Merge branch ' JENKINS-42389 ' Compare: https://github.com/jenkinsci/config-file-provider-plugin/compare/dbda7551cec1...f7206995991e

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: