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

Script error after upgrading config-file-provider

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • Jenkins:2.89
      config-file-provider:2.17
      job-dsl-plugin:1.66

    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

            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 daspilker has any idea?

            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 daspilker  has any idea?

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

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

            domi 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!

            fcojfernandez Francisco Fernández added a comment - domi 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!

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

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

            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

            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

            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

            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

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

              Dates

                Created:
                Updated:
                Resolved: