Bitbucket Data Center 9.0 Early Access Program release

Followup on the Condition issue. The same exception appears when I want to use a condition on a web-resource.

It has been fixed and will be released in next EAP, thanks for raising.

1 Like

Thanks for raising this.

Context has been updated, it will be released in next EAP.

This is intended and documented in the webresource 7.0.0 upgrade guide:

com.atlassian.plugin.web.Condition can no longer be used on web-resources, use UrlReadingCondition instead. Condition will not be deleted, it will remain part of web fragments and can continue to be used with web-item, web-section, and web-panel.

For your other query regarding Condition and the use in CSE, we are still looking into it. Thank you for your patience.

1 Like

Can you implement both Condition and UrlReadingCondition? This should mean no exceptions are thrown.

Iā€™ll look to get the documentation updated - to use conditions with CSE, both

  • com.atlassian.plugin.web.Condition
  • com.atlassian.webresource.spi.condition.UrlReadingCondition

must be used

Does this mean you will also add com.atlassian.applinks.api.ApplicationType and com.atlassian.applinks.spi.util.TypeAccessor ? I think weā€™lll need them to use MutatingApplicationLinkService

Yep. I tested locally with:

  • com.atlassian.applinks.spi.link.MutatingApplicationLinkService
  • com.atlassian.applinks.spi.util.TypeAccessor
  • com.atlassian.applinks.api.ApplicationType

with the yet unreleased eap and I am able to access these classes & use methods from them in an external plugin

1 Like

Can the Bitbucket/platform team please test whether atlassian-pocketknife-dynamic-modules works with the EAPs?

Weā€™re seeing modules register, but seemingly do nothing, and not appear in the UI. For example our web items are not showing up. If we move the module XML out of pocketknife things appear to work.

If we turn on debug logging thereā€™s various warnings I assume from grey API restrictions:

2024-07-10 12:09:21 [ThreadPoolAsyncTaskExecutor::Thread 31] DEBUG c.a.s.i.plugin.OsgiSafeProxyProvider - Error creating OSGI safe proxy. Returning unproxied bean instead.
java.lang.IllegalArgumentException: com.atlassian.plugin.schema.descriptor.DescribedModuleDescriptorFactory referenced from a method is not visible from class loader
	at java.base/java.lang.reflect.Proxy$ProxyBuilder.ensureVisible(Proxy.java:883)
	at java.base/java.lang.reflect.Proxy$ProxyBuilder.validateProxyInterfaces(Proxy.java:721)
	at java.base/java.lang.reflect.Proxy$ProxyBuilder.<init>(Proxy.java:648)
	at java.base/java.lang.reflect.Proxy.lambda$getProxyConstructor$1(Proxy.java:440)
	at java.base/jdk.internal.loader.AbstractClassLoaderValue$Memoizer.get(AbstractClassLoaderValue.java:329)
	at java.base/jdk.internal.loader.AbstractClassLoaderValue.computeIfAbsent(AbstractClassLoaderValue.java:205)
	at java.base/java.lang.reflect.Proxy.getProxyConstructor(Proxy.java:438)
	at java.base/java.lang.reflect.Proxy.newProxyInstance(Proxy.java:1037)
	at org.springframework.aop.framework.JdkDynamicAopProxy.getProxy(JdkDynamicAopProxy.java:126)
	at org.springframework.aop.framework.JdkDynamicAopProxy.getProxy(JdkDynamicAopProxy.java:118)
	at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:97)
	at com.atlassian.stash.internal.plugin.OsgiSafeProxyProvider.createNewProxy(OsgiSafeProxyProvider.java:109)
	at com.atlassian.stash.internal.plugin.OsgiSafeProxyProvider.proxy(OsgiSafeProxyProvider.java:62)
	at com.atlassian.stash.internal.plugin.OsgiSafeHostContainer$1.apply(OsgiSafeHostContainer.java:85)
	at com.google.common.collect.Maps$9.transformEntry(Maps.java:2117)
	at com.google.common.collect.Maps$12.getValue(Maps.java:2165)
	at com.google.common.collect.Maps$2.transform(Maps.java:142)
	at com.google.common.collect.Maps$2.transform(Maps.java:138)
	at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:52)
	at com.atlassian.sal.core.component.DefaultComponentLocator.getComponentInternal(DefaultComponentLocator.java:36)
	at com.atlassian.sal.api.component.ComponentLocator.getComponent(ComponentLocator.java:39)
	at com.atlassian.pocketknife.internal.lifecycle.modules.CombinedModuleDescriptorFactoryProvider.getHostModuleDescriptoryFactory(CombinedModuleDescriptorFactoryProvider.java:47)
	at com.atlassian.pocketknife.internal.lifecycle.modules.CombinedModuleDescriptorFactoryProvider.getModuleDescriptorFactory(CombinedModuleDescriptorFactoryProvider.java:36)

Can we please get confirmation that this library works on the EAPs? @vskalrud @TomRijnbeek

Hmmm this seems to happen because weā€™d put application="bitbucket" on our web-section modules, well we donā€™t need that so Iā€™ve removed it.

The debug warnings about failing to create JDK Proxy instances still persist though.

Hi,

As discussed some time ago, and following your suggestion, in order to retrieve the pull request settings for a repository, we have been using the classes

  • com.atlassian.bitbucket.rest.fragment.DefaultRestFragmentContext
  • com.atlassian.bitbucket.rest.fragment.RestFragments
  • com.atlassian.bitbucket.rest.fragment.RestFragmentsFactory (and injecting with @ComponentImport)

We were finding these from com.atlassian.bitbucket.server:bitbucket-rest
but now that weā€™ve switched to bitbucket-rest-v2, we cannot resolve these imports.

Are these classes still avalailable in some other package?

1 Like

@bplump

  1. Is it correct, that Bitbucket 9.0 only supports JDK 17 and no other major JDK version?
  2. What are the plans to support JDK 21 to run Bitbucket?

Thanks for raising this, the replacement classes can be found in

<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-rest-v2-spi</artifactId>
    <scope>provided</scope>
</dependency>

as:

  • com.atlassian.bitbucket.rest.v2.fragment.RestFragmentsFactory
  • com.atlassian.bitbucket.rest.v2.fragment.RestFragments
  • com.atlassian.bitbucket.rest.v2.fragment.DefaultRestFragmentContext
2 Likes

Weā€™re going to change the return type in the next EAP to Map<RefChange, List<RefRestriction>> so it doesnā€™t have this problem. Thanks for highlighting it.

3 Likes

Is it correct, that Bitbucket 9.0 only supports JDK 17 and no other major JDK version?

Yes. Bitbucket 9.0 will only support Java 17 and will not support Java 21.

What are the plans to support JDK 21 to run Bitbucket?

I donā€™t know specifically when support will be added but it will definitely be supported in our first 9.x LTS (which is still several months away).

2 Likes

Thanks for raising. Weā€™ve tested atlassian-pocketknife-dynamic-modules with eap10 and are able to load modules dynamically.

Weā€™re going to investigate the debug logging, however it shouldnā€™t prevent pocketknife from working. Are you still facing any blockers from using pocketknife? Are you using the latest version 3.0.3?

Hi,
Is there a flag or something to disable websudo in Bitbucket? SImilar to what you can do in Jira: https://confluence.atlassian.com/adminjiraserver/configuring-secure-administrator-sessions-938847890.html#:~:text=of%20their%[ā€¦]nistrator%20sessions (edited)

1 Like

You can disable websudo by adding feature.websudo=false to your bitbucket.properties file.

2 Likes

9.0.0-rc7 has now been released!

Weā€™d like to announce the release of our first Bitbucket 9.0 release candidate, 9.0.0-rc7.

As you might guess from the change in terminology, we donā€™t anticipate any major changes between this release and the final Bitbucket 9.0 release. Weā€™ve been running this release on Atlassianā€™s Bitbucket DC systems and itā€™s proven stable and performant. We also believe weā€™ve addressed all the API feedback gathered from this thread and other Atlassian Platform 7 threads.

In addition to the changes below, weā€™ve written some guidance on how to migrate your Bitbucket plugins to REST v2: Bitbucket RESTv2 migration for plugin developers. Hopefully, this helps accelerate your plugin migration.

You can download 9.0.0-rc7 with these links:

Changes in this release

Updates based on partner feedback:

  • Changed the return type of RefRestrictionService.match to Map<RefChange, List<RefRestriction>> so it doesnā€™t use a Guava type.
  • Allowed the use of Applinks spi classes such as com.atlassian.applinks.spi.link.MutatingApplicationLinkService and com.atlassian.applinks.spi.util.TypeAccessor
  • Fixed a bug preventing the Theme menu from showing

Improvements to Client-side Extensions:

  • Added fileChange context to the following file-content CSE extension points:
    • bitbucket.file-content.source.toolbar.primary
    • bitbucket.file-content.source.toolbar.secondary
    • bitbucket.file-content.diff-view.options
    • bitbucket.file-content.diff.toolbar.primary
    • bitbucket.file-content.diff.toolbar.secondary
  • The fileChange context contains information such as commitRange and path

The following packages have now been made public:

com.atlassian.bitbucket.branch.model.configuration
com.atlassian.analytics.api.annotations
com.atlassian.analytics.api.annotations.v2
com.atlassian.analytics.api.events
com.atlassian.analytics.api.events.v2
com.atlassian.analytics.api.extractor
com.atlassian.analytics.api.listener
com.atlassian.applinks.host
com.atlassian.applinks.host.spi
com.atlassian.applinks.host.spring
com.atlassian.applinks.host.util
com.atlassian.applinks.spi
com.atlassian.applinks.spi.application
com.atlassian.applinks.spi.auth
com.atlassian.applinks.spi.link
com.atlassian.applinks.spi.manifest
com.atlassian.applinks.spi.util
com.atlassian.crowd.event.remote
com.atlassian.crowd.event.remote.group
com.atlassian.crowd.event.remote.principal
com.atlassian.johnson
com.atlassian.johnson.config
com.atlassian.johnson.context
com.atlassian.johnson.event
com.atlassian.johnson.filters
com.atlassian.johnson.plugin.servlet.filter
com.atlassian.johnson.setup
com.atlassian.johnson.support
com.atlassian.johnson.util
com.atlassian.plugin.schema.descriptor
com.atlassian.plugin.schema.impl
com.atlassian.plugin.spring
com.atlassian.plugin.spring.pluginns
6 Likes

I do get a very strange ExceptionInInitializerError for java.util.ServiceLoader for a class that is a plugin compile dependency (in this case a high level elasticsearch rest client)

Caused by: java.lang.ExceptionInInitializerError: Exception java.util.ServiceConfigurationError: org.elasticsearch.xcontent.XContentBuilderExtension: org.elasticsearch.common.xcontent.XContentElasticsearchExtension Unable to get public no-arg constructor [in thread "http-nio-7990-exec-5"]
	at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:586)
	at java.base/java.util.ServiceLoader.getConstructor(ServiceLoader.java:679)

Here is the the elastic search lib code that causes the problem. It tries to load ā€˜pluggableā€™ implementations of a certain interface

        // Load pluggable extensions
        for (XContentBuilderExtension service : ServiceLoader.load(XContentBuilderExtension.class)) { ...

Does the ServiceLoader.load() mechanism work for plugins on P7?

Thanks - Ulrich

Thanks for making these APIs public for app development. :slight_smile:

For automation based on PR events, there are already several API available like Build status etc., so that apps can react on them.
But for Code Insight reports these Creation/Updated events are internal only.
Would it be possible to make them public API for apps, so that apps can listen and react on created/updated Code Insight reports?

Thanks in advance.

2 Likes

Thanks for the feedback, since this is more of a feature request (the code insight report events have always been private) Iā€™ve created https://jira.atlassian.com/browse/BSERV-19528 for the suggestion.

This will not make it into BB 9.0.0, but we can look to make these events public in future BB9 minor releases.

1 Like