scout-action icon indicating copy to clipboard operation
scout-action copied to clipboard

Matrix build overwrites comments

Open rwaffen opened this issue 1 year ago • 4 comments

Hi,

when i build multiple containers in a gha matrix and also scan them, only one output from docker scout will end up in the comments. only the last (?) i think.

for reference see here: https://github.com/voxpupuli/container-voxbox/pull/38

I have to build two versions to support two software versions inside, and i want to scan and see the output of both.

cheers, Robert

rwaffen avatar Aug 23 '24 07:08 rwaffen

Hi @rwaffen

Thanks for reporting the issue.

Yes you're right, currently it will overwrite the existing comment. You can try by setting keep-previous-comments: true (see https://github.com/docker/scout-action?tab=readme-ov-file#pull-request-comments) so it will add a new comment for each run. It's not a perfect solution as it will hide previous content behind a "Outdated" line but it might help short term by still keeping all the comments content.

I'll keep you posted once it will be fixed.

eunomie avatar Aug 23 '24 07:08 eunomie

thx for the quick answer! it's not perfect, but something... thx :).

seeing forward to a general solution for this :)

rwaffen avatar Aug 23 '24 08:08 rwaffen

We are also having this issue. We are using a matrix that executes a series of steps for a list of images. Each job invokes this action and the comments are overwriting eachother.

For reference it is a job that scans all image changes in the PR and does a scout compare.

cthtrifork avatar Jan 14 '25 14:01 cthtrifork

@eunomie thanks for acknowledging the issue, and your efforts in trying to fix this.

I'm also facing this challenge with matrix jobs and scanning different images.

As you alluded to, the Outdated collapsible section doesn't solve this yet. Happy to help test any fixes or provide more examples.

MPV avatar May 21 '25 21:05 MPV