-
Notifications
You must be signed in to change notification settings - Fork 127
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
sonar CI workflow keeps failing #2251
Comments
@maxonfjvipon please, take a look |
this is the recent one: https://sonarcloud.io/project/issues?resolved=false&types=BUG&sinceLeakPeriod=true&severities=BLOCKER%2CCRITICAL%2CMAJOR%2CMINOR&id=com.objectionary%3Aeo this is the failure in CI: https://github.com/objectionary/eo/actions/runs/7721848475/job/21049050225 maybe we should add Sonar to pull request checks? |
@c71n93 can you take it? |
@maxonfjvipon yeah, I can try. |
That's the output of sonar analysis: Issues with reliability of code is just places in code that was identified by sonar as bug. They needs to be fixed or ignored.
and there was the result: https://sonarcloud.io/summary/overall?id=c71n93_eo%3Aeo. Code coverage is correct here. I was trying to test my ideas in #2874, by adding "on pull-request" check to sonar workflow. But it doesn't work, because it requires @yegor256 How can I properly enable "on pull-request" check for this workflow? I need it to debug sonar CI locally in my PR. |
@yegor256 In master branch CI token is provided by the 'SONAR_TOKEN' environment variable:
For some reasons in CI on PR the token is not provided.
I don't have access to this token, it is private. @yegor256 Do you know how to make this token accessible from CI on PR? This token needs to see analysis results in SonarCloud. |
@yegor256 It looks like |
@yegor256 So what about adding Sonar to PR checks? Do we need it now? I need to add Sonar to PR checks here #2874 just to make sure if the test coverage in sonar will be fixed. Or we can just merge this changes. I'm 90% sure it will fix test coverage in sonar because I tried it on my fork of |
@yegor256 the coverage is working: https://sonarcloud.io/summary/new_code?id=com.objectionary%3Aeo. Now this 5 bugs need to be fixed. But now CI in PRs will fail because I added Sonar to PR check. We have to remove this PR check or fix issue with sonar token. |
@c71n93 let's fix these five bugs |
@yegor256 Okay, I will check this bugs and create issues |
Some useful materials about sharing secrets with workflows on PRs from forks: |
* objectionary#2251 add sonarcloud workflow * objectionary#2251 fix yamllint warnings * objectionary#2251 try pull-request-target * objectionary#2251 pull_request back * objectionary#2251 ignore this worflow for PRs from forks * remove unused jobs * restart CI * restart CI * old sonar workflow * add on PR * change organization and projectKey for sonar * fis projectKey
* objectionary#2251 fix multiple invocations throwing the same exception from assertThrows * objectionary#2251 use orElse for Optional * objectionary#2251 add cleanUp methods to be able to remove thread local variables * objectionary#2251 fix possible overflow on MIN_VALUE * objectionary#2251 remove thread local variable when no longer needed * objectionary#2251 fix qulice violation * objectionary#2251 remove unused cleanUp methods and add todo * objectionary#2251 fixed todos * sonar test
https://github.com/objectionary/eo/actions/workflows/sonar.yml
Let's find out what is the reason and fix
The text was updated successfully, but these errors were encountered: