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

Pull request analysis does not store the date of analysis #940

Closed
lorentz-1 opened this issue Aug 9, 2024 · 4 comments
Closed

Pull request analysis does not store the date of analysis #940

lorentz-1 opened this issue Aug 9, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@lorentz-1
Copy link

lorentz-1 commented Aug 9, 2024

Describe the bug
On version 1.18.0 of plugin with SonarQube 10.3, Pull request analysis do not have the field Last Analysis Date filled out. It seems to only be filled out for branch scans and not PR scans.

To Reproduce
Steps to reproduce the behavior:

  1. Perform a PR analysis for any project and also perform a branch analysis
  2. Go to the project on SonarQube once analysis is done for both project and the pull requests,
  3. Click on Project Settings tab
  4. Click on Branches and Pull Requests tab
  5. See that branches will show Last Analysis Date for all Branches that have been scanned
  6. See that the Pull requests tab wont show Analysis Date for any PRs that have been scanned

Expected behavior
I expect the Last Analysis Date tab to be filled for both Pull Request and Branches.

Screenshots
Pull request:
image

Branch Scan
image

Software Versions

  • SonarQube Version: 10.3
  • Plugin Version: 1.18.0

Additional context
Since the in-build housekeeping does not work for SonarQube 10.3 , our Database is never being cleaned up. So I rely on the Last Analysis data to perform manual clean ups.
This issue never existed on older version of SonarQube / Plugin 9.9 (LTS) | 1.14.0

@lorentz-1 lorentz-1 added the bug Something isn't working label Aug 9, 2024
mc1arke added a commit that referenced this issue Aug 11, 2024
The component ID was being used to create a map of analysis dates to
items, but the Pull Request's component ID did not map into this item,
so the Pull Request web service was always returning the analysis date
as empty. The service has been altered to use the root component ID as
was used in the search to ensure the IDs align.
mc1arke added a commit that referenced this issue Aug 11, 2024
The component ID was being used to create a map of analysis dates to
items, but the Pull Request's component ID did not map into this item,
so the Pull Request web service was always returning the analysis date
as empty. The service has been altered to use the root component ID as
was used in the search to ensure the IDs align.
@mc1arke mc1arke added the awaiting release Merged but not currently in release version label Aug 11, 2024
@mc1arke
Copy link
Owner

mc1arke commented Aug 12, 2024

Since the in-build housekeeping does not work for SonarQube 10.3

You should be able to kick this into life by changing the retention days to something other than the default value, and then change it back.

@lorentz-1
Copy link
Author

Since the in-build housekeeping does not work for SonarQube 10.3

You should be able to kick this into life by changing the retention days to something other than the default value, and then change it back.

Just did this and now it seems to work for all branches. However the Pull Requests are still left without being cleaned up.

@lilayam
Copy link

lilayam commented Sep 5, 2024

Waiting for this fix.

@mc1arke
Copy link
Owner

mc1arke commented Sep 7, 2024

Released in 1.22.0

@mc1arke mc1arke closed this as completed Sep 7, 2024
@mc1arke mc1arke removed the awaiting release Merged but not currently in release version label Sep 7, 2024
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

3 participants