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

Script error after upgrading config-file-provider

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      Jenkins:2.89
      config-file-provider:2.17
      job-dsl-plugin:1.66
    • Similar Issues:

      Description

      I'm getting an error when I'm executing my dsl scripts after upgrading config-file-provider to version 2.17.

      Steps to reproduce this error:

      1. Create a Freestyle project
      2. Add a Build Step: Process Job DSLs
      3. Use the provided DSL Script (dummy for this example):
        configFiles {
          customConfig {
            id('123456789')
            name('Old_Config_File')
            comment('This is a comment.')
            content('My Content')
            providerId('')
          }
        }
        

      After save and build the job, I get this error:

      Processing provided DSL script
      ERROR: Found multiple extensions which provide method customConfig with arguments [script$_run_closure1$_closure2@830385b]: [[org.jenkinsci.plugins.configfiles.custom.CustomConfig, org.jenkinsci.plugins.configfiles.custom.CustomConfig]]
      Finished: FAILURE
      

      If I use config-file-provider:2.16.4, this job finish SUCCESS

      Could it be a regression or do I have to make changes in my script?

        Attachments

          Issue Links

            Activity

            Hide
            imod Dominik Bartholdi added a comment -

            hmm, very strange - especially as the output seems to imply the class 
            org.jenkinsci.plugins.configfiles.custom.CustomConfig
            was found twice...

            did you update all required plugins as well?

            maybe Daniel Spilker has any idea?

            Show
            imod Dominik Bartholdi added a comment - hmm, very strange - especially as the output seems to imply the class  org.jenkinsci.plugins.configfiles.custom.CustomConfig was found twice... did you update all required plugins as well? maybe Daniel Spilker  has any idea?
            Hide
            fcojfernandez Francisco Fernández added a comment -

            Dominik Bartholdi all dependencies of config-file-provider are updated even to upper versions in some cases.

            Show
            fcojfernandez Francisco Fernández added a comment - Dominik Bartholdi all dependencies of config-file-provider are updated even to upper versions in some cases.
            Hide
            fcojfernandez Francisco Fernández added a comment -

            Dominik Bartholdi I have been investigating in depth. Something weird has happened and a test class has been loaded causing this error. The root cause is my own PR-45 and it's only affecting in test environments, as remote debug or acceptance tests. In production environments this issue is not reproducible. I'm preparing a new PR fixing my previous (It will be available in a while), so I will assign this issue to me.

            My apologise and sorry for the inconvenience!

            Show
            fcojfernandez Francisco Fernández added a comment - Dominik Bartholdi I have been investigating in depth. Something weird has happened and a test class has been loaded causing this error. The root cause is my own PR-45 and it's only affecting in test environments, as remote debug or acceptance tests. In production environments this issue is not reproducible. I'm preparing a new PR fixing my previous (It will be available in a while), so I will assign this issue to me. My apologise and sorry for the inconvenience!
            Hide
            imod Dominik Bartholdi added a comment -

            do big deal, glad you have found the cause of the issue!

            Show
            imod Dominik Bartholdi added a comment - do big deal, glad you have found the cause of the issue!
            Show
            fcojfernandez Francisco Fernández added a comment - I've created the PR: https://github.com/jenkinsci/config-file-provider-plugin/pull/48
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Francisco Javier Fernandez Gonzalez
            Path:
            src/test/java/org/jenkinsci/lib/configprovider/ExtensionPointTestConfig.java
            src/test/java/org/jenkinsci/lib/configprovider/SystemConfigFilesManagementTest.java
            http://jenkins-ci.org/commit/config-file-provider-plugin/c8924e0e3378e1c6fbe3964ee9bad4c4a92d2f1f
            Log:
            JENKINS-49067 Use of @TestExtension instead of @Extension

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Francisco Javier Fernandez Gonzalez Path: src/test/java/org/jenkinsci/lib/configprovider/ExtensionPointTestConfig.java src/test/java/org/jenkinsci/lib/configprovider/SystemConfigFilesManagementTest.java http://jenkins-ci.org/commit/config-file-provider-plugin/c8924e0e3378e1c6fbe3964ee9bad4c4a92d2f1f Log: JENKINS-49067 Use of @TestExtension instead of @Extension
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Dominik Bartholdi
            Path:
            src/test/java/org/jenkinsci/lib/configprovider/ExtensionPointTestConfig.java
            src/test/java/org/jenkinsci/lib/configprovider/SystemConfigFilesManagementTest.java
            http://jenkins-ci.org/commit/config-file-provider-plugin/b5b4d0dcdf57127ed636e7b331edc67ada8026e5
            Log:
            Merge pull request #48 from fcojfernandez/JENKINS-49067

            JENKINS-49067 Script error after upgrading config-file-provider

            Compare: https://github.com/jenkinsci/config-file-provider-plugin/compare/271e9cb4ffcb...b5b4d0dcdf57

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Dominik Bartholdi Path: src/test/java/org/jenkinsci/lib/configprovider/ExtensionPointTestConfig.java src/test/java/org/jenkinsci/lib/configprovider/SystemConfigFilesManagementTest.java http://jenkins-ci.org/commit/config-file-provider-plugin/b5b4d0dcdf57127ed636e7b331edc67ada8026e5 Log: Merge pull request #48 from fcojfernandez/ JENKINS-49067 JENKINS-49067 Script error after upgrading config-file-provider Compare: https://github.com/jenkinsci/config-file-provider-plugin/compare/271e9cb4ffcb...b5b4d0dcdf57

              People

              • Assignee:
                fcojfernandez Francisco Fernández
                Reporter:
                fcojfernandez Francisco Fernández
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: