reconquest / atlassian-external-hooks

External Hooks plugin for Atlassian Bitbucket
https://external-hooks.reconquest.io
Other
44 stars 37 forks source link

Add datacenter support #78

Closed georgy closed 5 years ago

kovetskiy commented 5 years ago

Hi. Just installed the plugin from master and ran altas-run locally, tried to install pre-receive hook and got following: screenshot

I've checked the code and I see that this message appears when the clustering is available:

public boolean isAvailable ()
Returns
true if clustering is available; otherwise, false

I'm not sure that it's correct, because I don't have a cluster locally, it's just a single instance (I don't know why ClusterService is available actually in this case).

How do you think, should we replace it with isClustered() method?

public boolean isClustered ()
Returns
true if clustering is available and at least two nodes have joined the cluster

https://docs.atlassian.com/bitbucket-server/javadoc/4.1.6/api/reference/com/atlassian/bitbucket/cluster/ClusterService.html

georgy commented 5 years ago

Check the type of license you have please. Is it DC license or a regular one?

kovetskiy commented 5 years ago

@georgy I didn't specify any license explicitly, just running it through atlas-run (without any arguments specified), I also cleaned up target directory in order to have clean setup.

Although, this is what I found in admin panel: licensing

This is weird, but the bitbucket really thinks I have a cluster? clustering

And no specific licenses in plugin specified: no license in plugin

Thanks for assisting in the issue.

georgy commented 5 years ago

What matters the license for your bitbucket. Looks like you have DC version (Clustering: Available). The problem with isClustered() would be that I can get DC with one node, put my script outside of the shared home folder, add the second node and have fun time figuring out why my who works only for some people :).