Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin incompatible with 10.0.0 SonarQube #753

Closed
pragmaticivan opened this issue Apr 4, 2023 · 27 comments
Closed

Plugin incompatible with 10.0.0 SonarQube #753

pragmaticivan opened this issue Apr 4, 2023 · 27 comments
Labels
bug Something isn't working

Comments

@pragmaticivan
Copy link

Describe the bug
Server bootstraps, but UI has an error that breaks any usage of the system.

To Reproduce
Steps to reproduce the behavior:

  1. Perform an upgrade from 9.9

Expected behavior
UI loads a list of projects.

Software Versions

  • SonarQube Version: 10.0.0
  • Plugin Version: 1.14.0
@pragmaticivan pragmaticivan added the bug Something isn't working label Apr 4, 2023
@yamaoto
Copy link

yamaoto commented Apr 4, 2023

Can confirm, The UI is making a request to /api/features/list and receiving a response body containing only a single symbol: [ (an open square bracket).

Downgrading to the SonarQube 9.9.0 version working correctly

@pragmaticivan
Copy link
Author

FYI, I've also tested removing this plugin. It works without the community plugin.

@mc1arke
Copy link
Owner

mc1arke commented Apr 5, 2023

Sonarsource have updated the method names for checking feature status (https://github.com/SonarSource/sonarqube/blob/master/server/sonar-server-common/src/main/java/org/sonar/server/feature/SonarQubeFeature.java) so at the very least we'll need to alter our implementation of that class (https://github.com/mc1arke/sonarqube-community-branch-plugin/blob/master/src/main/java/com/github/mc1arke/sonarqube/plugin/server/CommunityBranchFeatureExtension.java), but also the Java Agent that redefines some of the bundled classes that implement those methods.

I've not checked for other potential breaking changes in 10.0 yet

mc1arke added a commit that referenced this issue Apr 5, 2023
Sonarqube 10 has removed legacy support for modules as well as removing
deprecated properties historically used for specifying branch targets.
Additionally, the interface for managing Sonarqube features has had a
method renamed, which makes the new version of Sonarqube binary
incompatible with the plugin. The references to Sonarqube's removed code
have been removed from the plugin, and the implementations of the
interface and Java agent that dynamically updates Sonarqube code that
also implements the interface have been updated to use the new method
name.
mc1arke added a commit that referenced this issue Apr 5, 2023
Sonarqube 10 has removed legacy support for modules as well as removing
deprecated properties historically used for specifying branch targets.
Additionally, the interface for managing Sonarqube features has had a
method renamed, which makes the new version of Sonarqube binary
incompatible with the plugin. The references to Sonarqube's removed code
have been removed from the plugin, and the implementations of the
interface and Java agent that dynamically updates Sonarqube code that
also implements the interface have been updated to use the new method
name.
mc1arke added a commit that referenced this issue Apr 6, 2023
Sonarqube 10 has removed legacy support for modules as well as removing
deprecated properties historically used for specifying branch targets.
Additionally, the interface for managing Sonarqube features has had a
method renamed, which makes the new version of Sonarqube binary
incompatible with the plugin. The references to Sonarqube's removed code
have been removed from the plugin, and the implementations of the
interface and Java agent that dynamically updates Sonarqube code that
also implements the interface have been updated to use the new method
name.

As the Sonarqube server binaries are now compiled against Java 17, the
build process has been bumped to JDK 17, but continues to produce Java
11 artefacts to allow scanner components to be compatible with the
ongoing Java 11 support in the scanner.
mc1arke added a commit that referenced this issue Apr 7, 2023
Sonarqube 10 has removed legacy support for modules as well as removing
deprecated properties historically used for specifying branch targets.
Additionally, the interface for managing Sonarqube features has had a
method renamed, which makes the new version of Sonarqube binary
incompatible with the plugin. The references to Sonarqube's removed code
have been removed from the plugin, and the implementations of the
interface and Java agent that dynamically updates Sonarqube code that
also implements the interface have been updated to use the new method
name.

As the Sonarqube server binaries are now compiled against Java 17, the
build process has been bumped to JDK 17, but continues to produce Java
11 artefacts to allow scanner components to be compatible with the
ongoing Java 11 support in the scanner.
@cdubalaru
Copy link

Is there any plan to release a fix for this?

@archerne
Copy link

archerne commented May 3, 2023

Just pulled the feature/sonarqube-10_0-support branch. it is working with sonarqube 10, back up and working

@LocalHeroPro
Copy link

After updating 9.9.0.65466 > 0.0.0.68432,
with sonarqube-community-branch-plugin-1.14.0.jar
I got on homepage Loading... spinner and
in console:
image

@marcossv9
Copy link

same issue here. I've upgraded from 9.9 to 10.0.0 using the latest version of the plugin and got the loading screen too..

@washington-guedes
Copy link

One way to bypass the loading screen is to set noCheckCertificate: true in the plugins config

@dt233569
Copy link

I am trying community branch plugin with 9.9 version & sonar is failing to load with error Current edition does not support branch feature
Can someone help with setting up sonar 9.9 with community branch plugin.I followed all the steps thats available in the installation process of sonar branch plugin,but it doesnt startup
@marcossv9 @yamaoto

@Pexers
Copy link

Pexers commented May 22, 2023

+1
Experiencing the same issue on v10.0.
Downgrading sonar to v9.9 fixed the problem.

@marcossv9
Copy link

marcossv9 commented May 22, 2023

noCheckCertificate: true

@washington-guedes where did you set that ? I guess here.
One thing to note, is that I installed the plugin using the sonarqube helm chart.
thanks

@marcossv9
Copy link

noCheckCertificate: true

@washington-guedes where did you set that ? I guess here. One thing to note, is that I installed the plugin using the sonarqube helm chart. thanks

sadly, that didn't work.

@edwinflorezr
Copy link

Just pulled the feature/sonarqube-10_0-support branch. it is working with sonarqube 10, back up and working

How can i test this solution in my installation of sonarqube version 10?

@nicolaizav93
Copy link

After updating 9.9.0.65466 > 0.0.0.68432, with sonarqube-community-branch-plugin-1.14.0.jar I got on homepage Loading... spinner and in console: image

The same problem. After deleting community-branch-plugin, i can log in into the sonarqube.

@coderguy1998
Copy link

Same here. Using SonarQube v10.

@OneCyrus
Copy link
Contributor

looks like 10.1 is out now. If someone tries it with 10.1 would be great to hear if this potential issue is still there.

@praseeb
Copy link

praseeb commented Jul 6, 2023

Anyone tried 10.1? Is the issue still there?

@mc1arke
Copy link
Owner

mc1arke commented Jul 6, 2023

10.1 isn't compatible with any version of this plugin, not even a pre-release version. I'll work out the required changes once I get time

bluebu added a commit to bluebu/sonarqube-community-branch-plugin that referenced this issue Jul 21, 2023
    based on the branch: feature/sonarqube-10_0-support

    1. upgrade sonarqubeVersion to '10.0.0.68432'
    2. fixed dbClient.componentDao().insert(DbSession session, ComponentDto item, boolean isMainBranch)
    3. fixed UT code
@mgexm
Copy link

mgexm commented Aug 17, 2023

when the plugin is ready for 10.1 I figure it will work with 10.0 .... I'm on 9.9 right now so I figure I'll need to upgrade Version 9.9 (build 65466) to 10 ... which will probably need the plugin to do that ... and then to 10.1 ! :) thank you for doing this work @mc1arke

@mgexm
Copy link

mgexm commented Aug 31, 2023

I was able to build from https://github.com/bluebu/sonarqube-community-branch-plugin.git master branch:

sonarqube@qat-sonarq-01:$ mkdir 10.1.0-bluebu
sonarqube@qat-sonarq-01:
$ cd 10.1.0-bluebu/
sonarqube@qat-sonarq-01:/10.1.0-bluebu$ git clone https://github.com/bluebu/sonarqube-community-branch-plugin.git - Can't find link
Cloning into 'sonarqube-community-branch-plugin'...
remote: Enumerating objects: 4156, done.
remote: Counting objects: 100% (156/156), done.
remote: Compressing objects: 100% (83/83), done.
remote: Total 4156 (delta 51), reused 109 (delta 32), pack-reused 4000
Receiving objects: 100% (4156/4156), 1.02 MiB | 10.00 MiB/s, done.
Resolving deltas: 100% (2005/2005), done.
sonarqube@qat-sonarq-01:
/10.1.0-bluebu$ cd sonarqube-community-branch-plugin/
sonarqube@qat-sonarq-01:~/10.1.0-bluebu/sonarqube-community-branch-plugin$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
sonarqube@qat-sonarq-01:~/10.1.0-bluebu/sonarqube-community-branch-plugin$ docker build --build-arg SONARQUBE_VERSION=10.1.0-community --build-arg PLUGIN_VERSION=1.15.0-SNAPSHOT -t bluebu_sonarqube:10.1.0 .

[+] Building 87.3s (12/12) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 685B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 72B 0.0s
=> [internal] load metadata for http://docker.io/library/sonarqube:10.1.0-community 0.2s
=> [internal] load metadata for http://docker.io/library/gradle:7.3.3-jdk11-alpine 0.2s
=> [internal] load build context 0.1s
=> => transferring context: 2.55MB 0.1s
=> CACHED [stage-1 1/2] FROM http://docker.io/library/sonarqube:10.1.0-community@sha256:ce58f64b6a3675aa0905cc11f3427269d663eea0159ab9c 0.0s
=> CACHED [builder 1/4] FROM http://docker.io/library/gradle:7.3.3-jdk11-alpine@sha256:755150f3629bf71e8de605ce74396a633774d4009466ba01 0.0s
=> [builder 2/4] COPY . /home/build/project 0.2s
=> [builder 3/4] WORKDIR /home/build/project 0.0s
=> [builder 4/4] RUN gradle build -x test 85.3s
=> [stage-1 2/2] COPY --from=builder --chown=sonarqube:sonarqube /home/build/project/build/libs/sonarqube-community-branch-plugi 0.1s
=> exporting to image 0.1s
=> => exporting layers 0.1s
=> => writing image sha256:cbadb0e215950993bdf6f178366e11b77805413acb481abb361cf62188535c17 0.0s
=> => naming to http://docker.io/library/bluebu_sonarqube:10.1.0

sonarqube@qat-sonarq-01:~/10.1.0-bluebu$ docker images -a
REPOSITORY TAG IMAGE ID CREATED SIZE
bluebu_sonarqube 10.1.0 cbadb0e21595 27 minutes ago 715MB

@xlatt
Copy link

xlatt commented Sep 1, 2023

Just pulled the feature/sonarqube-10_0-support branch. it is working with sonarqube 10, back up and working

How did you run the build?

I tried to build the branch with my local jdk and gradle setup and also with Dockerfile which I found in the branch but build failed mostly with errors:

error: cannot find symbol

I would attach whole log but it is fairly lengthy. To reproduce just checkout feature/sonarqube-10_0-support and run
docker build -t sonar-branch-plugin -f Dockerfile .

@xlatt
Copy link

xlatt commented Sep 1, 2023

I was able to build from https://github.com/bluebu/sonarqube-community-branch-plugin.git master branch:

sonarqube@qat-sonarq-01:$ mkdir 10.1.0-bluebu sonarqube@qat-sonarq-01:$ cd 10.1.0-bluebu/ sonarqube@qat-sonarq-01:/10.1.0-bluebu$ git clone https://github.com/bluebu/sonarqube-community-branch-plugin.git - Can't find link Cloning into 'sonarqube-community-branch-plugin'... remote: Enumerating objects: 4156, done. remote: Counting objects: 100% (156/156), done. remote: Compressing objects: 100% (83/83), done. remote: Total 4156 (delta 51), reused 109 (delta 32), pack-reused 4000 Receiving objects: 100% (4156/4156), 1.02 MiB | 10.00 MiB/s, done. Resolving deltas: 100% (2005/2005), done. sonarqube@qat-sonarq-01:/10.1.0-bluebu$ cd sonarqube-community-branch-plugin/ sonarqube@qat-sonarq-01:~/10.1.0-bluebu/sonarqube-community-branch-plugin$ git status On branch master Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean sonarqube@qat-sonarq-01:~/10.1.0-bluebu/sonarqube-community-branch-plugin$ docker build --build-arg SONARQUBE_VERSION=10.1.0-community --build-arg PLUGIN_VERSION=1.15.0-SNAPSHOT -t bluebu_sonarqube:10.1.0 .

[+] Building 87.3s (12/12) FINISHED docker:default => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 685B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 72B 0.0s => [internal] load metadata for http://docker.io/library/sonarqube:10.1.0-community 0.2s => [internal] load metadata for http://docker.io/library/gradle:7.3.3-jdk11-alpine 0.2s => [internal] load build context 0.1s => => transferring context: 2.55MB 0.1s => CACHED [stage-1 1/2] FROM http://docker.io/library/sonarqube:10.1.0-community@sha256:ce58f64b6a3675aa0905cc11f3427269d663eea0159ab9c 0.0s => CACHED [builder 1/4] FROM http://docker.io/library/gradle:7.3.3-jdk11-alpine@sha256:755150f3629bf71e8de605ce74396a633774d4009466ba01 0.0s => [builder 2/4] COPY . /home/build/project 0.2s => [builder 3/4] WORKDIR /home/build/project 0.0s => [builder 4/4] RUN gradle build -x test 85.3s => [stage-1 2/2] COPY --from=builder --chown=sonarqube:sonarqube /home/build/project/build/libs/sonarqube-community-branch-plugi 0.1s => exporting to image 0.1s => => exporting layers 0.1s => => writing image sha256:cbadb0e215950993bdf6f178366e11b77805413acb481abb361cf62188535c17 0.0s => => naming to http://docker.io/library/bluebu_sonarqube:10.1.0

sonarqube@qat-sonarq-01:~/10.1.0-bluebu$ docker images -a REPOSITORY TAG IMAGE ID CREATED SIZE bluebu_sonarqube 10.1.0 cbadb0e21595 27 minutes ago 715MB

Did you try running sonarqube with this plugin? I managed to build it too but when I run sonarqube with artifact from bluebu repo it failed to start.

mc1arke added a commit that referenced this issue Sep 16, 2023
Sonarqube 10 has removed legacy support for modules as well as removing
deprecated properties historically used for specifying branch targets.
Additionally, the interface for managing Sonarqube features has had a
method renamed, which makes the new version of Sonarqube binary
incompatible with the plugin. The references to Sonarqube's removed code
have been removed from the plugin, and the implementations of the
interface and Java agent that dynamically updates Sonarqube code that
also implements the interface have been updated to use the new method
name.

As the Sonarqube server binaries are now compiled against Java 17, the
build process has been bumped to JDK 17, but continues to produce Java
11 artefacts to allow scanner components to be compatible with the
ongoing Java 11 support in the scanner.
@hballangan-mdsol
Copy link

@xlatt download snapshot from the github actions. This link is for 10.1
https://github.com/mc1arke/sonarqube-community-branch-plugin/actions/runs/6209374819?pr=806#artifacts

@praseeb
Copy link

praseeb commented Nov 16, 2023

Hi All,

Any update on this issue, is SonarQube latest version is supporting community plugin?
We are currently in SonarQube version 9.9 and Community Branch Plugin version 1.14.0, kindly suggest a way to upgrade our SonarQube application.

@mc1arke
Copy link
Owner

mc1arke commented Dec 29, 2023

10.0 and 10.1 compatible versions have been published to Github and Dockerhub today

@mc1arke mc1arke closed this as completed Dec 29, 2023
@praseeb
Copy link

praseeb commented Jan 3, 2024

@mc1arke Could you please share the links here for both. Is that Community Branch Plugin new version is released, that's what you are referring?

@mc1arke
Copy link
Owner

mc1arke commented Jan 3, 2024

The releases page of this repository lists all the releases, with the release notes stating compatibility against Sonarqube versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests