Skip to content

De-duplicate sonar job in the CI #1238

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

Merged
merged 7 commits into from
Sep 7, 2023

Conversation

jmartinesp
Copy link
Member

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Fix duplicate Sonar scanner job, and hopefully the very long run times.

Motivation and context

Sonar is running twice in the CI and it's become super slow.

Checklist

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2023

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/j7BWfq

@@ -14,7 +14,7 @@ env:

jobs:
sonar:
name: Project Check Suite
name: Sonar Quality Checks
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am pretty sure I had done this change in the past, but I cannot find where. The name could be updated too (at line 1)

run: |
npm install --save-dev @babel/core
npm install --save-dev @babel/plugin-transform-flow-strip-types
yarn add danger-plugin-lint-report --dev
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember having removed this as well :/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's quite weird. I remember we removed some binaries from the repo and that re-wrote history. Could that be related?

@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (9e5b462) 57.62% compared to head (9a3e2eb) 57.62%.
Report is 6 commits behind head on develop.

❗ Current head 9a3e2eb differs from pull request most recent head a2587b0. Consider uploading reports for the commit a2587b0 to get more accurate results

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1238   +/-   ##
========================================
  Coverage    57.62%   57.62%           
========================================
  Files         1066     1066           
  Lines        27677    27677           
  Branches      5713     5713           
========================================
  Hits         15948    15948           
  Misses        9244     9244           
  Partials      2485     2485           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ElementBot
Copy link
Collaborator

ElementBot commented Sep 7, 2023

Warnings
⚠️

gradle/libs.versions.toml#L13 - A newer version of androidx.core:core-ktx than 1.10.1 is available: 1.12.0

⚠️

gradle/libs.versions.toml#L18 - A newer version of androidx.lifecycle:lifecycle-runtime-ktx than 2.6.1 is available: 2.6.2

⚠️

gradle/libs.versions.toml#L25 - A newer version of androidx.compose:compose-bom than 2023.08.00 is available: 2023.09.00

⚠️

gradle/libs.versions.toml#L95 - A newer version of androidx.compose.material3:material3 than 1.2.0-alpha06 is available: 1.2.0-alpha07

Generated by 🚫 dangerJS against a2587b0

@jmartinesp
Copy link
Member Author

Ok, Sonar CI times are back to 10-15min, instead of 35-60min.

@jmartinesp jmartinesp marked this pull request as ready for review September 7, 2023 06:35
@jmartinesp jmartinesp requested a review from a team as a code owner September 7, 2023 06:35
@jmartinesp jmartinesp requested review from bmarty and removed request for a team September 7, 2023 06:35
@jmartinesp
Copy link
Member Author

jmartinesp commented Sep 7, 2023

About the 2 vulnerabilities, they are false positives as we know they exist and the keys mentioned are intentionally public, right?

EDIT: it's confirmed they're false positives, they've been addressed in Sonar.

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking at this Jorge!

}
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to confirm, the work-around is not needed anymore?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They recently added support for KMP source sets, so I'd be really surprised if they didn't support the default Kotlin ones 😅 . But yes, the analysis seems to be working fine after removing these lines. I couldn't find where this support was added though.

@@ -203,6 +203,6 @@ dependencygraph = { id = "com.savvasdalkitsis.module-dependency-graph", version.
dependencycheck = { id = "org.owasp.dependencycheck", version.ref = "dependencycheck" }
dependencyanalysis = { id = "com.autonomousapps.dependency-analysis", version.ref = "dependencyanalysis" }
paparazzi = "app.cash.paparazzi:1.3.1"
sonarqube = "org.sonarqube:4.3.1.3277"
sonarqube = "org.sonarqube:4.2.1.3168"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment above that 4.3.1.3277 is problematic, because Renovate will try to upgrade again.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@jmartinesp jmartinesp enabled auto-merge (squash) September 7, 2023 11:10
@jmartinesp jmartinesp merged commit e19b27b into develop Sep 7, 2023
@jmartinesp jmartinesp deleted the misc/jme/fix-duplicate-sonar-job branch September 7, 2023 11:19
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.

3 participants