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

[Bug][Sonarqube] Can not load data scope - Requires support for Sonarcloud API #7091

Closed
2 of 3 tasks
ces-truongvu opened this issue Mar 4, 2024 · 19 comments · Fixed by #7112 or #8132
Closed
2 of 3 tasks

[Bug][Sonarqube] Can not load data scope - Requires support for Sonarcloud API #7091

ces-truongvu opened this issue Mar 4, 2024 · 19 comments · Fixed by #7112 or #8132
Assignees
Labels
severity/p2 This bug doesn’t affect the functionality or isn’t evident type/bug This issue is a bug
Milestone

Comments

@ces-truongvu
Copy link

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

Add Sonarqube connection successfully but its projects not loaded when adding Data scope.

What do you expect to happen

Should show Sonarqube projects.

How to reproduce

  1. Added & test connection succesfully
  2. Add data scope, it shows nothing in the popup window

image

Anything else

I found out that the key of the organization is required. Seems you are using deprecated API, check it out here.

Version

v0.21.0-beta6

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@ces-truongvu ces-truongvu added the type/bug This issue is a bug label Mar 4, 2024
@abeizn
Copy link
Contributor

abeizn commented Mar 5, 2024

@ces-truongvu This seems to be a problem with filling in the connection, and the test connection does have a bug, which causes the user to test successfully even if he fills in the wrong information.
image

@abeizn
Copy link
Contributor

abeizn commented Mar 5, 2024

@ces-truongvu It will take effect in v0.21.0-beta7 version, expected to be released this week.

@ces-truongvu
Copy link
Author

@abeizn Thank you.

@ces-truongvu
Copy link
Author

ces-truongvu commented Mar 8, 2024

Hi @abeizn,

I've updated to the latest version (v0.21.0.beta7), I believe this issue still not be fixed.

Steps to produce

Test connection works

Screenshot from 2024-03-08 14-15-43

But data scope does not show my projects.

image

What I found out

So, I've started development environment and modified the following file backend/plugins/sonarqube/api/remote_api.go by adding the required query string (organization) as it was written here, then it shows my projects.

image

I wish I can create the PR but I am not familiar with Golang.
I hope that helpful. Thanks.

@abeizn abeizn reopened this Mar 11, 2024
@abeizn
Copy link
Contributor

abeizn commented Mar 11, 2024

@ces-truongvu Are you using the sonarcloud version? We do not support sonarcloud yet, the corresponding issue is: #4838.

The supported versions are shown in this document: https://devlake.apache.org/docs/Plugins/sonarqube

@ces-truongvu
Copy link
Author

@ces-truongvu Are you using the sonarcloud version? We do not support sonarcloud yet, the corresponding issue is: #4838.

The supported versions are shown in this document: https://devlake.apache.org/docs/Plugins/sonarqube

@abeizn Yes, I'm using Sonar cloud. Got it, thanks for your support.

@mrpaapi
Copy link

mrpaapi commented Mar 12, 2024

@ces-truongvu - We are using SonarQube Server - Enterprise EditionVersion 9.9.2 (build 77730). Connection is shown as successful. I still dont see projects. They are not loaded when adding Data scope. Can you please assist.

@ces-truongvu
Copy link
Author

ces-truongvu commented Mar 28, 2024

@ces-truongvu - We are using SonarQube Server - Enterprise EditionVersion 9.9.2 (build 77730). Connection is shown as successful. I still dont see projects. They are not loaded when adding Data scope. Can you please assist.

@mrpaapi Devlake only supports SonarQube v8.x, v9.x. Find out more here.

@marais-vzc
Copy link

I'm not sure this issue is resolved?

I'm using 1.0.0-beta9 and still seeing the same behaviour.

When going to "Manage Connection" and click test, the UI says succeeded, but if you look at the logs, it actually failed.

When viewing the scopes, and you click test connection, this time it correct says disconnected / failed, and then not return anything.

The (redacted html) response from the search api on sonarqube is :

	<body>
	    <div id="content">
	        <div class="global-loading">
	            <i class="spinner global-loading-spinner"></i> 
	            <span aria-live="polite" class="global-loading-text">Loading...</span>
	        </div>
	    </div>
	    <script>
	        window.baseUrl = '';
	        window.serverStatus = 'UP';
	        window.instance = 'SonarQube';
	        window.official = true;
	    </script>
	    <script type="module" src="/js/outDBSRE6XU.js"></script>
	</body>

The response should be json, not html which is why this fails.

@Startrekzky Startrekzky reopened this May 28, 2024
@marais-vzc
Copy link

Hmm, fault exists between chair and keyboard. Well, kindoff...

I realised that I entered the url wrong. I omitted the /api/ path in the url. Now I have it consistently returning with the correct json response from the API, but I still don't get any scopes back 🤔

@Startrekzky Startrekzky added the severity/p1 This bug affects functionality or significantly affect ux label Jun 3, 2024
@klesh klesh added this to the v1.0 milestone Jun 4, 2024
@Startrekzky Startrekzky assigned d4x1 and unassigned klesh Jun 5, 2024
@d4x1
Copy link
Contributor

d4x1 commented Jun 5, 2024

Hmm, fault exists between chair and keyboard. Well, kindoff...

I realised that I entered the url wrong. I omitted the /api/ path in the url. Now I have it consistently returning with the correct json response from the API, but I still don't get any scopes back 🤔

@marais-vzc What's the sonarqube's version that you are using?

@mieliespoor
Copy link
Contributor

Latest LTS - SonarQube DC 9.9.5

@klesh klesh modified the milestones: v1.0, v1.1 Jun 6, 2024
@klesh
Copy link
Contributor

klesh commented Jun 6, 2024

SonarQube >9.2 and SonarCloud are not supported at this point.
Collecting vote.

@sr2530
Copy link

sr2530 commented Jun 6, 2024

When can we expect to get DevLake support for SonarQube Enterprise Edition 10.5.1?

@klesh
Copy link
Contributor

klesh commented Jun 7, 2024

@sr2530 No one is working on it at this point, we are open for anyone who would like to contribute.

Copy link

github-actions bot commented Aug 7, 2024

This issue has been automatically marked as stale because it has been inactive for 60 days. It will be closed in next 7 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Aug 7, 2024
@mieliespoor
Copy link
Contributor

not stale

@mintsweet mintsweet removed the Stale label Aug 7, 2024
@klesh klesh changed the title [Bug][Sonarqube] Can not load data scope [Bug][Sonarqube] Can not load data scope - Need to support Sonarcloud API Sep 9, 2024
@klesh klesh changed the title [Bug][Sonarqube] Can not load data scope - Need to support Sonarcloud API [Bug][Sonarqube] Can not load data scope - Requires support for Sonarcloud API Sep 9, 2024
@klesh klesh added severity/p2 This bug doesn’t affect the functionality or isn’t evident and removed severity/p1 This bug affects functionality or significantly affect ux labels Sep 10, 2024
@klesh klesh assigned Startrekzky and unassigned d4x1 Sep 10, 2024
@jphelpsqred
Copy link

@sr2530 No one is working on it at this point, we are open for anyone who would like to contribute.

Someone had submitted a PR, it just needs to be approved. #7849

@klesh klesh assigned klesh and unassigned Startrekzky Oct 8, 2024
@klesh
Copy link
Contributor

klesh commented Oct 8, 2024

FYI. I am working on the Sonarcloud support now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/p2 This bug doesn’t affect the functionality or isn’t evident type/bug This issue is a bug
Projects
None yet