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

Name cannot contain '/' after upgrade to 703.v72ff4b_259600

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • scm-api-plugin
    • None

      Getting error that branch name cannot contain "/"

       

      Looks like that it is from that file: https://github.com/jenkinsci/scm-api-plugin/blob/master/src/main/java/jenkins/scm/api/SCMFile.java#L82-L84

       

      but change (based on the git blame) is pretty old so not sure what truly has happened here 

          [JENKINS-75207] Name cannot contain '/' after upgrade to 703.v72ff4b_259600

          Mark Waite added a comment -

          Please provide enough details so that others can duplicate the issue. Many, many Jenkins users have branch names with '/' characters in them, including several pull requests to Jenkins core (10179, 10127, 10098, 10010, 10009, 10008) . I have a test job that includes a branch with slashes and it works as expected.

          "How to report an issue" provides a very good checklist of the type of information that is needed so that others can duplicate the issue. If that additional information is not provided, this will be closed as "Cannot reproduce".

          Mark Waite added a comment - Please provide enough details so that others can duplicate the issue. Many, many Jenkins users have branch names with '/' characters in them, including several pull requests to Jenkins core ( 10179 , 10127 , 10098 , 10010 , 10009 , 10008 ) . I have a test job that includes a branch with slashes and it works as expected. "How to report an issue" provides a very good checklist of the type of information that is needed so that others can duplicate the issue. If that additional information is not provided, this will be closed as "Cannot reproduce".

          Javier added a comment - - edited

          Hi!

          I have the same problem. After updating the some plugins in Jenkins, when doing a push on any branch containing a '/' (such as 'feature/whatever') of the project in the Organization Folder, the first logs get in the job console look like this:

          Branch event
          java.lang.IllegalArgumentException: Name cannot contain '/'
          at PluginClassLoader for scm-api//jenkins.scm.api.SCMFile.<init>(SCMFile.java:83)
          at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.filesystem.BitbucketSCMFile.<init>(BitbucketSCMFile.java:58)
          at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getFile(BitbucketServerAPIClient.java:1086)
          at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.filesystem.BitbucketSCMFile.type(BitbucketSCMFile.java:109)
          at PluginClassLoader for scm-api//jenkins.scm.api.SCMFile.getType(SCMFile.java:265)
          at PluginClassLoader for scm-api//jenkins.scm.api.SCMFile.isFile(SCMFile.java:238)
          at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.filesystem.BitbucketSCMFile.content(BitbucketSCMFile.java:86)
          at PluginClassLoader for scm-api//jenkins.scm.api.SCMFile.contentAsString(SCMFile.java:335)
          at PluginClassLoader for workflow-multibranch//org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:113)
          at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:445)

          If the '/' character is removed from the branch name, the first checkout is OK.

          Environment values: 

          Ubuntu 22.04
          JDK 21.0.5
          Bitbucket Branch Source Plugin Versión 934.4.0
          SCM API Plugin Versión 703.v72ff4b_259600
          Jenkins 2.974.3

          Let me know if you need more info to reproduce it.

          Regards!

          Javier added a comment - - edited Hi! I have the same problem. After updating the some plugins in Jenkins, when doing a push on any branch containing a '/' (such as 'feature/whatever') of the project in the Organization Folder, the first logs get in the job console look like this: Branch event java.lang.IllegalArgumentException: Name cannot contain '/' at PluginClassLoader for scm-api//jenkins.scm.api.SCMFile.<init>(SCMFile.java:83) at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.filesystem.BitbucketSCMFile.<init>(BitbucketSCMFile.java:58) at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getFile(BitbucketServerAPIClient.java:1086) at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.filesystem.BitbucketSCMFile.type(BitbucketSCMFile.java:109) at PluginClassLoader for scm-api//jenkins.scm.api.SCMFile.getType(SCMFile.java:265) at PluginClassLoader for scm-api//jenkins.scm.api.SCMFile.isFile(SCMFile.java:238) at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.filesystem.BitbucketSCMFile.content(BitbucketSCMFile.java:86) at PluginClassLoader for scm-api//jenkins.scm.api.SCMFile.contentAsString(SCMFile.java:335) at PluginClassLoader for workflow-multibranch//org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:113) at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311) at hudson.model.ResourceController.execute(ResourceController.java:101) at hudson.model.Executor.run(Executor.java:445) If the '/' character is removed from the branch name, the first checkout is OK. Environment values:  Ubuntu 22.04 JDK 21.0.5 Bitbucket Branch Source Plugin Versión 934.4.0 SCM API Plugin Versión 703.v72ff4b_259600 Jenkins 2.974.3 Let me know if you need more info to reproduce it. Regards!

          pawel added a comment - - edited

          java.lang.IllegalArgumentException: Name cannot contain '/'
          at PluginClassLoader for scm-api//jenkins.scm.api.SCMFile.<init>(SCMFile.java:83)
          at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.filesystem.BitbucketSCMFile.<init>(BitbucketSCMFile.java:58)
          at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getFile(BitbucketServerAPIClient.java:1086)
          at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.filesystem.BitbucketSCMFile.type(BitbucketSCMFile.java:109)
          at PluginClassLoader for scm-api//jenkins.scm.api.SCMFile.getType(SCMFile.java:265)
          at PluginClassLoader for scm-api//jenkins.scm.api.SCMFile.isFile(SCMFile.java:238)
          at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.filesystem.BitbucketSCMFile.content(BitbucketSCMFile.java:86)
          at PluginClassLoader for scm-api//jenkins.scm.api.SCMFile.contentAsString(SCMFile.java:335)
          at PluginClassLoader for workflow-multibranch//org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:113)
          at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          at hudson.model.ResourceController.execute(ResourceController.java:101)
          at hudson.model.Executor.run(Executor.java:445)

          Multibranch job with bitbucket

          pawel added a comment - - edited java.lang.IllegalArgumentException: Name cannot contain '/' at PluginClassLoader for scm-api//jenkins.scm.api.SCMFile.<init>(SCMFile.java:83) at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.filesystem.BitbucketSCMFile.<init>(BitbucketSCMFile.java:58) at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getFile(BitbucketServerAPIClient.java:1086) at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.filesystem.BitbucketSCMFile.type(BitbucketSCMFile.java:109) at PluginClassLoader for scm-api//jenkins.scm.api.SCMFile.getType(SCMFile.java:265) at PluginClassLoader for scm-api//jenkins.scm.api.SCMFile.isFile(SCMFile.java:238) at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.filesystem.BitbucketSCMFile.content(BitbucketSCMFile.java:86) at PluginClassLoader for scm-api//jenkins.scm.api.SCMFile.contentAsString(SCMFile.java:335) at PluginClassLoader for workflow-multibranch//org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:113) at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311) at hudson.model.ResourceController.execute(ResourceController.java:101) at hudson.model.Executor.run(Executor.java:445) Multibranch job with bitbucket

          Basil Crow added a comment -

          Does the problem still occur after downgrading cloudbees-bitbucket-branch-source from 934.4.0 to 934.3.2?

          Basil Crow added a comment - Does the problem still occur after downgrading cloudbees-bitbucket-branch-source from 934.4.0 to 934.3.2?

          Javier added a comment - - edited

          I cannot downgrade plugin:

          But the behavior starts right after upgrading the plugin.

          Javier added a comment - - edited I cannot downgrade plugin: But the behavior starts right after upgrading the plugin.

          Javier added a comment -

          After examining the code, I see a commit from 5 days ago:

          Commit 7686eb7
          https://github.com/jenkinsci/bitbucket-branch-source-plugin/commit/7686eb77fd64bb8995b4c168dd955fbb6c9ea66e

          This commit adds the broken code to the plugin.

          Javier added a comment - After examining the code, I see a commit from 5 days ago: Commit 7686eb7 https://github.com/jenkinsci/bitbucket-branch-source-plugin/commit/7686eb77fd64bb8995b4c168dd955fbb6c9ea66e This commit adds the broken code to the plugin.

          Basil Crow added a comment -

          nfalco FYI

          Basil Crow added a comment - nfalco FYI

          Ingo added a comment -

          After manually downgrading the plugin to version 934.3.2 it works again.

          bitbucket-branch-source:934.3.2

          Install plugin from the web UI

          Ingo added a comment - After manually downgrading the plugin to version 934.3.2 it works again. bitbucket-branch-source:934.3.2 Install plugin from the web UI

          Daniel added a comment -

          This is still hitting us with Bitbucket Cloud and 934.4.1 (which claims to have been fixed), so had to downgrade as well.

          06:51:21  Started by user <redacted>
          06:51:22  java.lang.IllegalArgumentException: Name cannot contain '/'
          06:51:22      at PluginClassLoader for scm-api//jenkins.scm.api.SCMFile.<init>(SCMFile.java:83)
          06:51:22      at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.filesystem.BitbucketSCMFile.<init>(BitbucketSCMFile.java:58)
          06:51:22      at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.client.repository.BitbucketRepositorySource.toBitbucketSCMFile(BitbucketRepositorySource.java:90)
          06:51:22      at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getFile(BitbucketCloudApiClient.java:879)
          06:51:22      at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.filesystem.BitbucketSCMFile.type(BitbucketSCMFile.java:109)
          06:51:22      at PluginClassLoader for scm-api//jenkins.scm.api.SCMFile.getType(SCMFile.java:265)
          06:51:22      at PluginClassLoader for scm-api//jenkins.scm.api.SCMFile.isFile(SCMFile.java:238)
          06:51:22      at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.filesystem.BitbucketSCMFile.content(BitbucketSCMFile.java:86)
          06:51:22      at PluginClassLoader for scm-api//jenkins.scm.api.SCMFile.contentAsString(SCMFile.java:335)
          06:51:22      at PluginClassLoader for workflow-multibranch//org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:113)
          06:51:22      at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
          06:51:22      at hudson.model.ResourceController.execute(ResourceController.java:101)
          06:51:22      at hudson.model.Executor.run(Executor.java:445)
          06:51:22  [Bitbucket] Notifying commit build result
          06:51:22  [Bitbucket] Build result notified
          06:51:22  Finished: FAILURE

          Daniel added a comment - This is still hitting us with Bitbucket Cloud and 934.4.1 (which claims to have been fixed), so had to downgrade as well. 06:51:21  Started by user <redacted> 06:51:22  java.lang.IllegalArgumentException: Name cannot contain '/' 06:51:22      at PluginClassLoader for scm-api //jenkins.scm.api.SCMFile.<init>(SCMFile.java:83) 06:51:22      at PluginClassLoader for cloudbees-bitbucket-branch-source //com.cloudbees.jenkins.plugins.bitbucket.filesystem.BitbucketSCMFile.<init>(BitbucketSCMFile.java:58) 06:51:22      at PluginClassLoader for cloudbees-bitbucket-branch-source //com.cloudbees.jenkins.plugins.bitbucket.client.repository.BitbucketRepositorySource.toBitbucketSCMFile(BitbucketRepositorySource.java:90) 06:51:22      at PluginClassLoader for cloudbees-bitbucket-branch-source //com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getFile(BitbucketCloudApiClient.java:879) 06:51:22      at PluginClassLoader for cloudbees-bitbucket-branch-source //com.cloudbees.jenkins.plugins.bitbucket.filesystem.BitbucketSCMFile.type(BitbucketSCMFile.java:109) 06:51:22      at PluginClassLoader for scm-api //jenkins.scm.api.SCMFile.getType(SCMFile.java:265) 06:51:22      at PluginClassLoader for scm-api //jenkins.scm.api.SCMFile.isFile(SCMFile.java:238) 06:51:22      at PluginClassLoader for cloudbees-bitbucket-branch-source //com.cloudbees.jenkins.plugins.bitbucket.filesystem.BitbucketSCMFile.content(BitbucketSCMFile.java:86) 06:51:22      at PluginClassLoader for scm-api //jenkins.scm.api.SCMFile.contentAsString(SCMFile.java:335) 06:51:22      at PluginClassLoader for workflow-multibranch //org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:113) 06:51:22      at PluginClassLoader for workflow-job //org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311) 06:51:22      at hudson.model.ResourceController.execute(ResourceController.java:101) 06:51:22      at hudson.model.Executor.run(Executor.java:445) 06:51:22  [Bitbucket] Notifying commit build result 06:51:22  [Bitbucket] Build result notified 06:51:22  Finished: FAILURE

            Unassigned Unassigned
            istocia2 pawel
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: