Details
-
Suggestion
-
Resolution: Fixed
-
None
-
None
Description
Summary
When Bitbucket returns a 404 or 401 when trying to query for tags and branches, Bamboo logs the whole HTML response in the logs. This can cause the logs to grow in size.
Steps to reproduce
- Create a Bitbucket Cloud linked repository and create a plan to use it
- Delete the bitbucket repository in Bitbucket Cloud
- Go to Edit Plan >> Branches
Expected outcome
Bamboo logs the whole HTML response:
2016-11-29 11:02:50,180 WARN [http-nio-8085-exec-20] [RESTCall] Response from GET /1.0/repositories/username/reponame/branches-tags/ null (404): <!DOCTYPE html> <html lang="en"> <head> <meta id="bb-bootstrap" data-current-user="{"username": "dericleeyy", "displayName": "Deric Lee", "uuid": "{ecf95ecb-e91a-40e6-b6f6-b658aca3b60f}", "firstName": "Deric Lee", "avatarUrl": "https://bitbucket.org/account/dericleeyy/avatar/32/?ts=1480407352", "lastName": "", "isTeam": false, "isSshEnabled": true, "isKbdShortcutsEnabled": true, "id": 2946122, "isAuthenticated": true}" /> ...
Improvement
Improve the exception handling for these cases and avoid filling the logs
Workaround
Mute some of the RESTCall logs by adding this in Bamboo Install/atlassian-bamboo/WEB-INF/classes/log4j.properties:
log4j.category.com.atlassian.utils.RESTCall=ERROR
Then, restart Bamboo