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

#782: Add support for Sonarqube 10.1 #786

Conversation

bluebu
Copy link
Contributor

@bluebu bluebu commented Jul 21, 2023

based on the branch: feature/sonarqube-10_0-support #754 #753

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

fixed #782

Get the Artifacts, see as:

https://github.com/bluebu/sonarqube-community-branch-plugin/actions/runs/5621946627

@bluebu bluebu force-pushed the feature/sonarqube-10_1-support branch 3 times, most recently from a3228df to 86df03a Compare July 21, 2023 08:56
    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
@bluebu bluebu force-pushed the feature/sonarqube-10_1-support branch from 86df03a to 94fdaf0 Compare July 21, 2023 11:44
@qathy
Copy link

qathy commented Aug 4, 2023

Hello,
I've tried to build from the sources, injecting this PR.
Unfortunately, it doesn't compile as is because loadProjectConfiguration has a new signature:
loadProjectConfiguration(DbSession dbSession, String projectUuid);

=> need to change from:
.setExcludeFromPurge(isBranchExcludedFromPurge(projectConfigurationLoader.loadProjectConfiguration(dbSession, mainComponentDto), branchName))
=> to:
.setExcludeFromPurge(isBranchExcludedFromPurge(projectConfigurationLoader.loadProjectConfiguration(dbSession, mainComponentDto.uuid()), branchName))

Thanks to that, branch management is back in my SonarQube 10.1 instance.

Still need to check if MR are working as expected.

@Operativekiwi
Copy link

Hello, I've tried to build from the sources, injecting this PR. Unfortunately, it doesn't compile as is because loadProjectConfiguration has a new signature: loadProjectConfiguration(DbSession dbSession, String projectUuid);

=> need to change from: .setExcludeFromPurge(isBranchExcludedFromPurge(projectConfigurationLoader.loadProjectConfiguration(dbSession, mainComponentDto), branchName)) => to: .setExcludeFromPurge(isBranchExcludedFromPurge(projectConfigurationLoader.loadProjectConfiguration(dbSession, mainComponentDto.uuid()), branchName))

Thanks to that, branch management is back in my SonarQube 10.1 instance.

Still need to check if MR are working as expected.

I'm also facing an issue with building this, are you able to send the built JAR file?

@bluebu
Copy link
Contributor Author

bluebu commented Aug 11, 2023

Hello, I've tried to build from the sources, injecting this PR. Unfortunately, it doesn't compile as is because loadProjectConfiguration has a new signature: loadProjectConfiguration(DbSession dbSession, String projectUuid);
=> need to change from: .setExcludeFromPurge(isBranchExcludedFromPurge(projectConfigurationLoader.loadProjectConfiguration(dbSession, mainComponentDto), branchName)) => to: .setExcludeFromPurge(isBranchExcludedFromPurge(projectConfigurationLoader.loadProjectConfiguration(dbSession, mainComponentDto.uuid()), branchName))
Thanks to that, branch management is back in my SonarQube 10.1 instance.
Still need to check if MR are working as expected.

I'm also facing an issue with building this, are you able to send the built JAR file?

Get the Artifacts, see as:

https://github.com/bluebu/sonarqube-community-branch-plugin/actions/runs/5621946627

@bluebu bluebu changed the title #753 #782: Add support for Sonarqube 10.1 #782: Add support for Sonarqube 10.1 Aug 14, 2023
@qathy
Copy link

qathy commented Aug 16, 2023

Hello, I've tried to build from the sources, injecting this PR. Unfortunately, it doesn't compile as is because loadProjectConfiguration has a new signature: loadProjectConfiguration(DbSession dbSession, String projectUuid);
=> need to change from: .setExcludeFromPurge(isBranchExcludedFromPurge(projectConfigurationLoader.loadProjectConfiguration(dbSession, mainComponentDto), branchName)) => to: .setExcludeFromPurge(isBranchExcludedFromPurge(projectConfigurationLoader.loadProjectConfiguration(dbSession, mainComponentDto.uuid()), branchName))
Thanks to that, branch management is back in my SonarQube 10.1 instance.
Still need to check if MR are working as expected.

I'm also facing an issue with building this, are you able to send the built JAR file?

Sorry for the very late answer.
I won't deliver a jar file, as it is contained in artifacts officially delivered here: https://github.com/mc1arke/sonarqube-community-branch-plugin/suites/14469323013/artifacts/842449126
But just in case it may help, here is the git diff revealing my changes:
git_diff_sq_branch.txt

@keinar
Copy link

keinar commented Aug 20, 2023

Hi all, can anyone here explain why these changes do not merge yet?
Or someone knows when the support for Sonarqube 10.1 will add to the plugin?

@nixel2007
Copy link

Hi all, can anyone here explain why these changes do not merge yet?

Probably because repo owner has real life.

@jeremytbrun
Copy link

Like many others I've been waiting for this to be merged to support SonarQube 10.1. My question is if I were to pull down the artifact from the build of this PR and use it what potential issues would that introduce down the road once an official new version is released?

https://github.com/mc1arke/sonarqube-community-branch-plugin/actions/runs/5621946976

@marcelstoer
Copy link
Contributor

marcelstoer commented Sep 7, 2023

Hi all, can anyone here explain why these changes do not merge yet?

Probably because repo owner has real life.

Yes and no. It's the start of a pattern that often eventually leads to the death of once thriving open-source projects. Been there, done that (on both sides). Once PRs start piling up and go unrecognized by the maintainer(s), the community becomes discouraged and starts loosing interest. The root cause often is the dependency on a single owner/maintainer. If they didn't not recruit other maintainers in time for whatever reason (lack of community interest, own ego, etc.) projects then either die or forks start popping up - and the cycle starts anew.

For those generally interested in this topic I recommend "Roads and Bridges: The Unseen Labor Behind Our Digital Infrastructure".

@mc1arke
Copy link
Owner

mc1arke commented Sep 16, 2023

I'll re-create this against master branch once the 10.0 release has been created

@thoikono
Copy link

Hello,

Thanks for the info above
I am using helm chart 10.2 so SonarQube version is 10.2.
Just to understand
Currently we have https://github.com/mc1arke/sonarqube-community-branch-plugin/releases/download/1.14.0/sonarqube-community-branch-plugin-1.14.0.jar which is not working with SonarQube 10.x.
Correct?
Then we have this one : https://github.com/mc1arke/sonarqube-community-branch-plugin/suites/14469323013/artifacts/842449126 which is supposed to work with Sonarqube 10.x ?
However when I try to curl the artifacts url I get 404 ...
Any help?

@thoikono
Copy link

Hi again,

Regarding the 404 error, this was probably an authentication issue and I managed to workaround it.
Atm I see that in the SonarQube pod the plug is listed under /opt/sonarqube/extensions/plugins and in my sonar values.yaml I have:

sonar.web.javaOpts: "-javaagent:/opt/sonarqube/extensions/plugins/sonarqube-community-branch-plugin-1.15.0-SNAPSHOT.jar=web" sonar.ce.javaOpts: "-javaagent:/opt/sonarqube/extensions/plugins/sonarqube-community-branch-plugin-1.15.0-SNAPSHOT.jar=ce"

When I apply the helm chart with those values I see that in the pod the following variables are set :
SONAR_CE_JAVAOPTS=-javaagent:/opt/sonarqube/extensions/plugins/sonarqube-community-branch-plugin-1.15.0-SNAPSHOT.jar=ce SONAR_WEB_JAVAOPTS=-javaagent:/opt/sonarqube/extensions/plugins/sonarqube-community-branch-plugin-1.15.0-SNAPSHOT.jar=web

and also SonarQube is taking those into consideration:
sonarqu+ 116 1 15 13:42 ? 00:00:30 /opt/java/openjdk/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -Dcom.redhat.fips=false -javaagent:/opt/sonarqube/extensions/plugins/sonarqube-community-branch-plugin-1.15.0-SNAPSHOT.jar=web -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-10.2.0.77647.jar:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.6.0.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process11487101177289494279properties sonarqu+ 192 1 13 13:43 ? 00:00:17 /opt/java/openjdk/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -Dcom.redhat.fips=false -javaagent:/opt/sonarqube/extensions/plugins/sonarqube-community-branch-plugin-1.15.0-SNAPSHOT.jar=ce -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-10.2.0.77647.jar:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.6.0.jar org.sonar.ce.app.CeServer /opt/sonarqube/temp/sq-process2796355089470511639properties

However I still don't see the Pull requests option under Administration--> Configuration --> General Settings

Am I missing sth?
Any help appreciated

@randymelo
Copy link

hello people, any try this artifact whit the version 10.2.1?

@dedece35
Copy link

dedece35 commented Oct 4, 2023

hello people, any try this artifact whit the version 10.2.1?

+1

check issue #782 because current issue is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.