Hi everyone,
We are pleased to announce the availability of the first Early Access Program (EAP) release of Bitbucket Server 5.0.
This EAP release is so that add-on vendors and customers who have written in-house add-ons can update their add-ons and ensure they will work with the public release of Bitbucket Server 5.0.
Important things to note about this EAP release:
- This release should not be used in a production environment.
- This release does not include new features that may be part of the final 5.0 release.
- There may be other minor API changes between this release and the public release of Bitbucket Server 5.0.
Key changes for add-on developers in the Bitbucket Server 5.0 EAP release:
- New Comment API to make it easier for add-on developers to work with comments across the application.
- Removal of APIs previously deprecated during the Bitbucket Server 4.x lifecycle.
- Changes to the naming conventions of front-end AMD modules.
Read the full release notes below for more in-depth notes about the changes in the Bitbucket Server 5.0 EAP.
Installing the Bitbucket Server 5.0 EAP release
Links to download installers and archives:
Sources are available for users with a valid Bitbucket Server license through their license details at my.atlassian.com.
The Bitbucket Server 5.0 EAP can also be run with AMPS version 6.3.0-fef7990 by running this command with the Atlassian Plugin SDK installed:
atlas-run-standalone -u 6.3.0-fef7990 --product bitbucket --version 5.0.0-eap2
We need your feedback!
If you have any questions or feedback about this preview of Bitbucket Server 5.0, ask them in the Bitbucket Server category here in the Atlassian Developer Community forums, and our friendly team of developers will respond to them.
Bitbucket Server 5.0 EAP release notes
Bitbucket Server 5.0 EAP contains several changes that may affect existing add-ons. The changes are summarised below.
Removed deprecated Java APIs
Java APIs that have been previously deprecated in the Bitbucket Server 4.x lifecycle have been removed in this 5.0 EAP release.
List of API deprecation removals and replacements
Unless noted, these methods / classes / packages have been removed. All package references in this list are assumed to be prefixed with com.atlassian.bitbucket
unless otherwise specified.
-
.plugin.util
- The entire
bitbucket-plugin-util
module has been removed.
- The entire
-
.mirroring
-
.mirror
MirrorDisabledUpstreamEvent
MirrorEnabledUpstreamEvent
-
MirrorInstalledUpstreamEvent
: now extendsUpstreamLifecycleEvent
-
ENABLED
andDISABLED
: have been collapsed intoINSTALLED
-
-
.repository.ref.restriction
- Removed constructors:
RefRestrictionAddedEvent(Object source, Repository repository, RefRestriction restriction, Collection<ApplicationUser> affectedUsers, Collection<String> affectedGroups)
RefRestrictionDeletedEvent(Object source, Repository repository, RefRestriction restriction, Collection<ApplicationUser> affectedUsers, Collection<String> affectedGroups)
RefRestrictionUpdatedEvent(Object source, Repository repository, RefRestriction restriction, Collection<ApplicationUser> affectedUsers, Collection<String> affectedGroups)
RefRestrictionEvent(Object source, Repository repository, RefRestriction restriction, Collection<ApplicationUser> affectedUsers, Collection<String> affectedGroups)
RefRestrictionEvent#getAffectedGroups()
RefRestrictionEvent#getAffectedUsers()
RefRestriction.getAccessGrants()
- Removed constructors:
-
.commit
-
AbstractCommitsRequest#isIgnoringMissing()
: changed return type fromBoolean
toboolean
-
CommitsBetweenRequest
getMaxMessageLength()
getPaths()
getPropertyKeys()
getRepository()
isFollowingRenames()
isIgnoringMissing()
-
CommitsBetweenRequest.Builder
followRenames()
ignoreMissing()
maxMessageLength()
path()
paths(Iterable<String> values)
paths(String value, String... values)
propertyKey(String value)
propertyKeys(Iterable<String> values)
propertyKeys(String value, String... values)
-
TO_AUTHOR
: useCommit::getAuthor
instead -
UNLIMITED_MESSAGE_SIZE
: useUNLIMITED_MESSAGE_LENGTH
instead -
TO_ID
: useMinimalCommit::getId
instead
-
-
.content
-
AbstractFileContentCallback#offerBlame(List<Blame> blames)
: useofferBlame(Page<Blame> blames)
instead -
FileContentCallback#offerBlame(List<Blame> blames)
: useofferBlame(Page<Blame> blames)
instead -
ContentService#getBlame(...)
now returns aPage<Blame>
instead of aList<Blame>
-
Blame#TO_AUTHOR
: useBlame::getAuthor
instead -
SimpleDirectory(Path path, String contentId)
: useSimpleDirectory
’sBuilder
instead -
SimpleFile(Path path, String contentId)
: useSimpleFile
’sBuilder
instead
-
-
.event.pull
-
PullRequestApprovalEvent
: usePullRequestParticipantStatusUpdatedEvent
instead -
PullRequestApprovedEvent
: usePullRequestParticipantApprovedEvent
instead -
PullRequestRolesUpdatedEvent
: usePullRequestReviewersUpdatedEvent
instead -
PullRequestUnapprovedEvent
: usePullRequestParticipantUnapprovedEvent
instead
-
-
.io
-
LineReaderOutputHandler(String charsetName)
: useLineReaderOutputHandler(Charset)
instead -
TruncatedLineOutputHandler(int maxLineLength, @Nullable String encoding)
: useTruncatedLineOutputHandler(int, Charset)
instead
-
-
.project
-
AbstractProjectRequest(String key, String name, String description, boolean publiclyAccessible)
: useAbstractProjectRequest(AbstractBuilder builder)
instead
-
-
.pull
-
PullRequest#TO_ID
: usePullRequest::getId
instead -
PullRequestParticipantRequest#getApproved()
: usegetStatuses()
instead -
PullRequestService
-
approve()
: usesetReviewerStatus()
instead -
assignRole()
: useaddReviewer()
instead -
unassignRole()
: useremoveReviewer()
instead -
withdrawApproval()
: usesetReviewerStatus()
instead
-
-
-
.repository
-
RefChange
-
getRefId()
: usegetRef().getId()
instead -
TO_REF_ID
: useRefChange::getRefId
instead -
TO_TYPE
: useRefChange::getType
instead
-
-
RefService#resolveRef()
: useresolveRef(ResolveRefRequest)
instead -
SimpleRefChange#getRefId()
: useRefChange::getRefId
-
MinimalRef
-
TO_DISPLAY_ID
: useMinimalRef::getDisplayId
-
TO_ID
: useMinimalRef::getId
-
-
Ref::TO_LATEST_COMMIT
: useRef::getLatestCommit
-
Repository#NAME_MAX_SIZE
: useRepository#MAX_NAME_LENGTH
instead
-
-
.rest
-
.content.RestFile(RestPath path, String contentId)
: useRestFile(File)
instead -
.pull.RestPullRequestParticipant#newExample(String, PullRequestRole, Boolean)
: useRestPullRequestParticipant#newExample(String, PullRequestRole, PullRequestParticipantStatus)
instead
-
-
.server
-
ApplicationPropertiesService#getDefaultTimeZone()
: useTimeZoneService#getDefaultTimeZone()
-
-
.scm
-
AvailableScm#TO_ID
: useAvailableScm::getId
instead -
CommandBuilderSupport#environment()
: usewithEnvironment(String, String)
instead -
CommitsCommandParameters
-
UNLIMITED_MESSAGE_LENGTH
: useAbstractCommitRequest.UNLIMITED_MESSAGE_LENGTH
instead -
Boolean isIgnoringMissing()
: useboolean isIgnoringMissing()
instead
-
-
CommitsCommandParameters.Builder
-
Boolean isIgnoringMissing()
: useboolean isIgnoringMissing()
instead
-
-
ScmCommandFactory
-
Command<List<Blame>> blame()
: useCommand<Page<Blame>>
instead -
create()
: useRepositoryService.create()
instead -
fork()
: useRepositoryService.fork()
instead -
merge()
: useScmExtendedCommandFactory.merge()
instead -
resolveRef()
: useresolveRef(ResolveRefCommandParameters)
instead -
updateDefaultBranch()
: useScmExtendedCommandFactory.updateDefaultBranch()
instead
-
-
.pull
-
ScmPullRequestCommandFactory#canMerge()
: usetryMerge(PullRequest)
instead -
PluginPullRequestCommandFactory#canMerge()
: usetryMerge(PullRequest)
instead - default
tryMerge()
forPluginPullRequestCommandFactory
uses replacement fortryMerge()
-
-
.git.command.GitCommandFactory
-
GitCommand<List<Blame>> blame()
: useGitCommand<Page<Blame>> blame()
instead -
fork()
: useGitExtendedCommandFactory.fork()
instead -
merge()
: useGitExtendedCommandFactory.merge()
instead resolveRef(Repository repository, String refId)
-
updateDefaultBranch()
: useGitExtendedCommandFactory.updateDefaultBranch()
instead
-
-
.git.command.GitPullRequestCommandFactory
-
canMerge()
: usetryMerge(PullRequest)
instead rescope()
-
-
.git.command.CommitReader
-
CommitReader(Repository)
: useCommitReader(CommitReaderSettings)
instead -
CommitReader(Repository, boolean)
: useCommitReader(CommitReaderSettings)
instead
-
-
.git.command.merge.conflict
-
AddAddGitMergeConflict(String message, String path)
: useAddAddGitMergeConflict(String, String, boolean)
instead -
ContentGitMergeConflict(String message, String path)
: useContentGitMergeConflict(String, String, boolean)
instead
-
CompatibilityResolveRefsCommand
CompatibilityStreamBranchesCommand
-
AbstractCommandBuilder#environment()
: usewithEnvironment(String, String)
instead -
PluginCommandFactory
-
Command<List<Blame>> blame()
: useCommand<Page<Blame>>
instead - default
branches()
fork()
merge()
resolveRef(Repository repository, String refId)
- default
resolveRefs()
updateDefaultBranch()
-
-
.throttle
-
ThrottledScmRequestFactory(ThrottleService throttleService, I18nService i18nService, HelpPathService helpPathService)
: useThrottledScmRequestFactory(ThrottleService)
instead
-
-
-
.user
-
ApplicationUser::TO_ID
: useApplicationUser::getId
instead -
Person::TO_EMAIL_ADDRESS
: usePerson::getEmailAddress
instead
-
-
.util
-
PropertiesUtils
-
parseExpression(@Nullable String expression, long defaultValue)
: useparseExpressionAsLong(String)
instead -
parseExpression(@Nullable String expression, int defaultValue)
: useparseExpressionAsInt(String)
instead
-
-
UserUtils
-
IS_ACTIVE
: useApplicationUser::isActive
instead -
TO_ID
: useApplicationUser::getId
instead -
TO_USERNAME
: usePrincipal::getName
instead
-
-
-
.web
-
HasPullRequestApproveCondition
: useHasApprovedPullRequestCondition
instead -
IsNormalUserCondition
: useIsUserOfTypeCondition
instead
-
-
com.atlassian.webdriver.bitbucket.element.page
-
PullRequestDiffPage#getFileContent()
: usePullRequestDiffPage#getUnifiedFileContent()
instead
-
Redesigned Comment API
We have largely redesigned our API to make working with comments easier for add-on developers.
The new Comment API introduces two major components:
-
CommentService
: This service consolidates all comment related functionality and replaces the comment-related methods inPullRequestService
andCommitService
. This allowed us to remove a lot of duplicated functionality and provide a consistent behaviour for our API. This service is largely based on theCommentable
interface and isPullRequest
andCommit
agnostic. -
CommentThread
: This new addition to our model allows us to easily tie all comments in the same thread of discussion. Add-on developers will find that it is now a lot easier to navigate from a reply to the rest of the comments in a thread. All comments have a reference to thread they belong to which, in turn, provides access to the corresponding anchoring data (if available).
Removed explicit naming from front-end AMD modules
Bitbucket Server’s core JavaScript now uses ES Modules (they are transformed and end up as AMD modules). This means a lot of modules have had their names changed. As part of this rename there is a mapping to the old names; however, add-on developers are encouraged to use the new module names as the old ones are deprecated and will be removed in Bitbucket Server 6.0. Please note the following when working with JavaScript in Bitbucket Server 5.0 and later:
- Module names can now be inferred from a module’s file path starting from the static root path (
webapp/default/src/main/frontend/static
). For instance,.../frontend/static/bitbucket/internal/util/notifications/notifications.js
has a module name ofbitbucket/internal/util/notifications/notifications
. - The way values are exported in some modules may change because of the way ES module exports work. You are encouraged to check that the way you are consuming Bitbucket Server’s code still functions as expected.
Please note that modules within bitbucket/internal/
are not considered API and may change in any new version of Bitbucket Server.
Library updates and removals
- The host application exports Spring 4.3 to OSGi.
- The
atlassian-core
library has been removed from Bitbucket Server 5.0. -
atlassian-spring-scanner
has been upgraded to 2.1.3. Plugins using version 1.x ofatlassian-spring-scanner
will continue to work as normal. - Raphael is a bundled JavaScript library that has been deprecated since Bitbucket Server 4.10. It is not used by core Bitbucket Server code and has been removed for performance reasons. Third parties that rely on Raphael should bundle it in their add-ons from Bitbucket Server 5.0 onwards.
Bundled Scala updates
Bitbucket Server 4.x bundled the runtime environment for Scala 2.10 and 2.11. These runtime environments allow add-ons written in Scala to run without the need to include the Scala runtime environment in the add-on itself.
Bitbucket Server 5.0 removes support for Scala 2.10 and adds support for Scala 2.12. Support for Scala 2.11 also continues.
Spring Boot
Bitbucket Server 5.0 has been converted to run as a Spring Boot application. This should not impact the development or running of third-party add-ons.
Removed support for deprecated database versions
Support for the following database versions has been removed:
- Microsoft SQL Server 2008
- Postgres 9.1 and below
- MariaDB 5.5.22 and below
- MySQL 5.5.7 and below
- Oracle 11g and below
Again, this should not impact the development or running of third-party add-ons.