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-75157] Bitbucket client fail to retrieve resource with HTTP 404 for bitbucket server #973

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nfalco79
Copy link
Member

Remove the HttpHost parameter when calling in Apache client as the request could be different than the host configured in jenkins, for example in Bitbucket Server request using mirror link.
Rethrow the FileNotFoundException in executeMethod instead of encapsulate into other exception to respect the SCMFile interface. Rewrote the BitbucketSCMFile logic to not assume the SCMFile.type but resolve at runtime when needed.

.set("blame", false)
.expand();
String response = getRequest(url);
// TODO deserialize response...
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KalleOlaviNiemitalo could you help me to understand the response of bitbucket server?

https://developer.atlassian.com/server/bitbucket/rest/v905/api-group-repository/#api-api-latest-projects-projectkey-repos-repositoryslug-browse-path-get

It's not clear what return. Do you have an example?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tomorrow

.set("type", true)
.set("blame", false)
.expand();
String response = getRequest(url);

Check notice

Code scanning / CodeQL

Unread local variable Note

Variable 'String response' is never read.
@nfalco79 nfalco79 force-pushed the feature/JENKINS-75157 branch from 0caaac3 to 9400643 Compare January 18, 2025 17:47
…404 for bitbucket server (#970)

Remove the HttpHost parameter when calling in Apache client as the request could be different than the host configured in jenkins, for example in Bitbucket Server request using mirror link.
Rethrow the FileNotFoundException in executeMethod instead of encapsulate into other exception to respect the SCMFile interface.
Rewrote the BitbucketSCMFile logic to not assume the SCMFile.type but resolve at runtime when needed.
@nfalco79 nfalco79 force-pushed the feature/JENKINS-75157 branch from 9400643 to 2e71525 Compare January 18, 2025 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants