Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-75208] Checkout on bitbucket server fail with IllegalArgumentException "Name cannot contain '/'" #981

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

nfalco79
Copy link
Member

Fix the file name that the BitbucketServerAPIClient return from getFile method. Before was used the href instead of the name

…tException "Name cannot contain '/'"

Fix the file name that the BitbucketServerAPIClient return from getFile method. Before was used the href instead of the name
@jarlehansen
Copy link

This fixes a problem where the build fails, where the branch name contains "/". Hope this can be merged and released pretty fast, as it is a major problem for us currently.

@haraldgn
Copy link

This is indeed a showstopper for us as well - truly hope this will be merged quickly

@nfalco79 nfalco79 added the bug label Jan 30, 2025
@nfalco79 nfalco79 merged commit e1da70c into master Jan 30, 2025
20 checks passed
@nfalco79 nfalco79 deleted the feature/JENKINS-75208 branch January 30, 2025 20:01
@davmillar
Copy link

I've updated to the newest version of the plugin which states that it includes this fix, but I'm still getting this error message. Any guidance on what I would need to provide to debug the issue further?

@nfalco79
Copy link
Member Author

nfalco79 commented Feb 1, 2025

I've updated to the newest version of the plugin which states that it includes this fix, but I'm still getting this error message. Any guidance on what I would need to provide to debug the issue further?

Please provide build log in the issue and relevant jenkins log. Ensure to post also plugin versions:
https://www.jenkins.io/participate/report-issue/

@Zasimovich
Copy link

I've updated plugin cloudbees-bitbucket-branch-source to 934.4.1 version also and getting the same issues
Name cannot contain '/'

@nfalco79
Copy link
Member Author

nfalco79 commented Feb 4, 2025

I've updated plugin cloudbees-bitbucket-branch-source to 934.4.1 version also and getting the same issues Name cannot contain '/'

Logs

@ElectricWeasel
Copy link

Plugin at version 934.4.1 but still

Started by user [XXXXXXX](https://jenkins.vrit.dev/user/177e84a4-0d39-4488-8666-4da17ae4399d) 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.client.repository.BitbucketRepositorySource.toBitbucketSCMFile(BitbucketRepositorySource.java:90) at PluginClassLoader for cloudbees-bitbucket-branch-source//com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getFile(BitbucketCloudApiClient.java:879) 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) [Bitbucket] Notifying commit build result [Bitbucket] Build result notified Finished: FAILURE

@Zasimovich
Copy link

Zasimovich commented Feb 5, 2025

Temporary fixed by downgrade cloudbees-bitbucket-branch-source to older version 888.v8e6d479a_1730

nfalco79 added a commit that referenced this pull request Feb 5, 2025
…tException "Name cannot contain '/'" (#981)

Fix cloud client when file metadata return a path attribute that contains '/', for example 'scripts/Jenkinsfile'
nfalco79 added a commit that referenced this pull request Feb 5, 2025
…tException "Name cannot contain '/'" (#981)

Fix cloud client when file metadata return a path attribute that contains '/', for example 'scripts/Jenkinsfile'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants