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

CI: Silent lcov errors #3115

Merged
merged 3 commits into from
Nov 19, 2024
Merged

CI: Silent lcov errors #3115

merged 3 commits into from
Nov 19, 2024

Conversation

rhaschke
Copy link
Contributor

@rhaschke rhaschke commented Nov 18, 2024

Attempt to fix #3110 and #2866.

@rhaschke rhaschke force-pushed the fix-lcov branch 2 times, most recently from 7410d1d to b4b0a01 Compare November 18, 2024 18:01
@rhaschke
Copy link
Contributor Author

lcov errors are gone: https://github.com/moveit/moveit2/actions/runs/11897940917/job/33153316613
However, SonarScan execution still fails. I don't even know, what SonarScan actually does. @henningkayser, please decide to fix or disable it.

@sea-bass
Copy link
Contributor

sea-bass commented Nov 18, 2024

SonarScan ingests coverage data, plus runs its own static analysis on the code. It requires re-enabling the paid service, which far as I know has not been enabled since the transition from ros-planning to moveit orgs.

I would support disabling it for now, and having someone enabling it back if they decide to keep paying for the service.

Edit: actually. SonarCloud may be free for open source projects, so it may just need an admin able to link SonarCloud to the new org.

@rhaschke rhaschke marked this pull request as ready for review November 18, 2024 18:33
@rhaschke rhaschke changed the title CI: Turn lcov errors into warnings CI: Silent lcov errors Nov 18, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 18, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.52%. Comparing base (d962501) to head (29675de).
Report is 152 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3115      +/-   ##
==========================================
- Coverage   50.74%   45.52%   -5.22%     
==========================================
  Files         392      482      +90     
  Lines       32553    40431    +7878     
==========================================
+ Hits        16517    18401    +1884     
- Misses      16036    22030    +5994     

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


🚨 Try these New Features:

@EzraBrooks
Copy link
Member

@sea-bass SonarCloud is still set up. It's free for open-source projects and has not ever been a paid plan for moveit2

@EzraBrooks
Copy link
Member

EzraBrooks commented Nov 18, 2024

I believe the issue is that the SonarCloud API key is not available to PRs from forks (like this one) due to GitHub's very reasonable security measures of not sharing Secrets with CI jobs initiated from other repositories.

I thought that I had disabled running it for branches from forks, but maybe I'm misremembering.

The only two viable long-term solutions - assuming we want to keep SonarCloud, which I'd like us to but I'm not a frequent user of the moveit2 CI - are either disabling the check for PRs from forks (which means getting surprise CI failures after a merge, which seems not ideal) or doing a hack like this: https://michaelheap.com/access-secrets-from-forks/

@sea-bass
Copy link
Contributor

Aha! That makes sense. Thanks @EzraBrooks!

In that case overcoming the lcov stuff should clear things out.

I am on my phone and it's annoying to check whether we already have this, but on other repos we'e set things up so this particular step is conditioned on you running from a fork, and is otherwise skipped.

Why don't we merge this, and I can stick another PR with that logic on there to verify?

@EzraBrooks
Copy link
Member

EzraBrooks commented Nov 18, 2024

That's probably sensical. I also am not sure if renaming the org from ros-planning to moveit might have broken the old API key (though I'd hope those two things aren't tied together). I don't appear to be an admin on the MoveIt account on SonarCloud, @henningkayser might need to flip some switches to synchronize maintainer status with GitHub so others of us can do things to it?

Copy link
Contributor

@sea-bass sea-bass left a comment

Choose a reason for hiding this comment

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

Thank you @rhaschke! I've updated the required actions based on these changes.

@rhaschke rhaschke added this pull request to the merge queue Nov 19, 2024
@rhaschke
Copy link
Contributor Author

I've updated the required actions based on these changes.

What exactly do you mean by this? Which actions did need which (other) changes?

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Nov 19, 2024
@sea-bass sea-bass added this pull request to the merge queue Nov 19, 2024
@sea-bass
Copy link
Contributor

sea-bass commented Nov 19, 2024

I've updated the required actions based on these changes.

What exactly do you mean by this? Which actions did need which (other) changes?

Oh, just that adding ccov renamed the rolling-ci job to rolling-ci-ccov, so had to make the new one required, and unrequire the old one.

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Nov 19, 2024
@sea-bass
Copy link
Contributor

sea-bass commented Nov 19, 2024

Well, this is annoying. It kicks you off the merge queue when Sonar fails. I will merge this and address the issue after.

Edit: I think this was just flagging a lot of issues on code that was added while SonarScan was not actually getting to run. Namely, 7.1k LOC. Hopefully this is actually more reasonable now that CI is back up

@sea-bass sea-bass merged commit 6487249 into moveit:main Nov 19, 2024
11 checks passed
@rhaschke rhaschke deleted the fix-lcov branch November 19, 2024 12:07
@EzraBrooks
Copy link
Member

Thanks for the great work fixing CI! I was meaning to do this myself but it clearly never happened. I've just approved the request to get Codecov fully installed into the moveit org @rhaschke.

side note, the SonarCloud config needs some work from me or @nbbrooks given lessons learned from some other projects.. it's not quite as helpful as it could be since we haven't been iterating on it since it's been broken.

@nbbrooks
Copy link
Contributor

nbbrooks commented Nov 19, 2024

Awesome work @rhaschke and @sea-bass !

I was able to fix sonarcloud's initial confusion of the GH org migration when I was poking at #3068 - the dashboard is here https://sonarcloud.io/organizations/moveit (I did not need to make a new key). It is not fully functional yet, but at least the job is running and talking to the dashboard.

@rhaschke
Copy link
Contributor Author

I've just approved the request to get Codecov fully installed into the moveit org @rhaschke.

Unfortunately, codecov is still not correctly configured for the moveit repo:
image

Do you mind adding me as a moveit org admin?

@nbbrooks
Copy link
Contributor

I will look into the admin assignment separately, but moveit2's ccov was deactivated for some reason, I activated it.

@nbbrooks
Copy link
Contributor

Nevermind, it redirected me to my personal fork's ccov page :(

moveit's was activated so it is something else.

@nbbrooks
Copy link
Contributor

nbbrooks commented Nov 19, 2024

@rhaschke where are you seeing that? It looks like your upload failed, but succeeded for a separate PR's job (Enhancement/use hpp for headers) a few hours ago

https://app.codecov.io/github/moveit/moveit2/pulls

@rhaschke
Copy link
Contributor Author

@nbbrooks: I'm asking for MoveIt1:
https://github.com/moveit/moveit/actions/runs/11910451831/job/33208735806#step:12:3553

@rhaschke
Copy link
Contributor Author

rhaschke commented Nov 19, 2024

Looks like ccov is installed now. However, it states that I should use an upload token.
Didn't you disable the upload tokens in ccov settings: https://app.codecov.io/account/gh/moveit/org-upload-token

@nbbrooks
Copy link
Contributor

nbbrooks commented Nov 19, 2024

The org setting in codecov was "Required" - I have changed it to "Not required" to solve one thing at a time.

Once we have tings up and running we can decide if we want to add some upload protection by sticking it into a GitHub org secret for the codecov/codecov-action action to use.

I retriggered your https://github.com/moveit/moveit/actions/runs/11910451831 job to test if this resolves things.

@rhaschke
Copy link
Contributor Author

Thanks. Now it worked.

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.

SonarScan pipelines are failing on main CCov CI job failing in Rolling (Ubuntu Noble) - temporarily disabled
5 participants