-
Notifications
You must be signed in to change notification settings - Fork 1k
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
De-duplicate identical issue annotations from problemMatchers #504
Comments
@andymckay Can someone from experience side take a look? Why the customer gets same annotation twice? 😄 |
Just for reference, this is a check run with duplicated annotations: https://github.com/python/cpython/actions/runs/122021377 The one that says
is printed twice and gets two different annotations. |
This sounds like the same issue as #264 and actions/toolkit#395 |
Similar, but in this case this isn't done over different jobs. The same warning is generated multiple times in one run and hence it should be de-duplicatable at the runner level. Albeit if it were handled at the annotation level then no runner-specific code would be needed. |
Although if it's only fixed at the runner level, won't that miss the issue where someone has a PR run and a push run and the PR is from within the same repo and therefore causes similar duplication? IMHO the annotation level is the place to do it, if some specific message is already annotated against a line number, we don't need to see it again, regardless of which action run generated it. Is there a repo for the annotation stuff we should be raising this issue in instead? |
I've no idea about your build process @ammaraskar , but I'd have thought the solution here would be to disable the summary on CI builds: Suggests this would do the trick: |
Note that an instance of the runner scoped to a job. So if you want to de-dupe at the run level, then it needs to be done at the service level (the service that writes the annotations) |
@thboop https://github.com/JustinGrote/Super-Duper-Linter/runs/797950085?check_suite_focus=true#step:3:18 You closed the issue previously but didn't reference where and which team it was directed to. Since there's been no progress in six months, who do we directly talk to about this? Is the annotation problemMatcher code available publicly? |
There was a recent regression in the server-side code that causes every annotation to get created twice, we are rolling out a fix, etc 1-2 days to every deployment rings. |
@JustinGrote, thanks for the repro! There's a few different ways duplicate annotations can present themself: 1 annotation created in 1 job: Your repro is a great example. Currently, we have a bug where annotations are getting duplicated even if there is only a single annotation created on a single job. We are working on rolling out a fix for this now. 2+ identical annotations created in 1 job: The original post in this issue appears to have two identical annotations being created by the problem matcher in a single job. We can look at this as a runner issue, as we could solve it in the runner. 1 annotation created in 2+ jobs: If the same annotation is created in multiple jobs, we show it multiple times. This ticket was originally about this case. This can be valuable in some areas, for example knowing exactly what versions of a dependency your build failed on for a matrix build. It can also be detrimental, as it does create some noise for users. If you have thoughts on that, please post them in the community forum, our engineers monitor that forum and we'd love to discuss it more! |
@thboop, thanks for letting me know first scenario is a known issue and is being fixed. For second scenario, I can "hold back" the output and effectively deduplicate it prior to sending it to the "console" within my script, so I have a workaround for that case. |
@silverwind suggested a presumably pretty trivial way to fix this problem (from a display perspective) which allows you to see "exactly what versions of a dependency your build failed on for a matrix build" without the downside of "noise for users": I think there's also a third area of duplication too @thboop: |
FYI Scenario 1 appears to be fixed at least for me per #504 (comment), annotations are no longer displaying twice for the same annotation line. |
Just to add another situation where this can arise: I'm experimenting with a problem matcher for clang-tidy (C++ static analysis tool) and if there is an issue in a header file it triggers an annotation for every time that header file is included, which can be dozens of times. That's an example of the second scenario discussed above (multiple identical annotations in a single job). |
For something like this, assuming the log lines are standalone and not multi-line, you could do something fairly quick and dirty like piping the output into sort and then uniq to avoid the duplicates, and then annotating from the results, but similar behaviour could be achieved in the runner as mentioned which would fix it for everyone without producing such confusing log lines. |
The full error messages are multiline, although I'm only matching a single-line part of them, so I could |
Perhaps the trick is to It still feels like a workaround for the runner doing it though. |
Any ETA for this feature? The current support is not enough for serious projects, because:
|
I'm still seeing this issue |
Hey all, Since this issue does not seem to be a problem with the runner application, it concerns the GitHub actions platform more generally. Could you please post your feedback on the GitHub Community Support Forum which is actively monitored. Using the forum ensures that we route your problem to the correct team. 😃 |
There already is such a post in the forum FWIW: https://github.com/orgs/community/discussions/16661 |
In CPython we're trying to add a issue matcher for the MSVC compiler but it outputs the same warning multiple times (once per file and once in the summary usually). This results in identical annotations appearing for the same matcher, same message and line number which looks a bit cluttered:
It would be great if these identical check annotations could be avoided at the matcher level.
For reference, this is the commit in vscode that added de-duplication for problemMatchers: microsoft/vscode@b08de2e
The text was updated successfully, but these errors were encountered: