It seems that the Bitbucket Cloud API has some length limit on the key path parameter of the query used to create a new reference for a build.
Currently the entire branch name is used as the key, so that it triggers the error in the get step only for branch names exceeding 40 characters.
selected worker: e6b7913ef80d
--DEBUG MODE--
Commit: b59379ac055dd34c8d3e95918169da4d4e83955b
Build URL: http://***/builds/2
Set build status: {'state': 'INPROGRESS', 'key': 'branch-feature-< ... very long branch name>', 'name': 'branch-feature-< ... very long branch name> #2', 'url': 'http://***/builds/2', 'description': 'Concourse CI build, hijack as #74'}
Request result: {'type': 'error', 'error': {'fields': {'key': ['Ensure this value has at most 40 characters (it has 58).']}, 'message': 'key: Ensure this value has at most 40 characters (it has 58).'}}
HTTP 400 Bad Request - something's gone wrong. Set `source.debug: true` to show details
I do not know if Bitbucket Server is affected in the same way.
It seems that the Bitbucket Cloud API has some length limit on the
key
path parameter of the query used to create a new reference for a build.Currently the entire branch name is used as the key, so that it triggers the error in the
get
step only for branch names exceeding 40 characters.I do not know if Bitbucket Server is affected in the same way.