cml icon indicating copy to clipboard operation
cml copied to clipboard

`[send-]comment` option for custom watermark

Open dacbd opened this issue 3 years ago • 8 comments

So that when cml goes to update a comment it can determine which comment to update.

For cases where multiple comments are made or when multiple workflows run against a single PR each with a cml comment, they can better distinguish which comment to update.

dacbd avatar Sep 08 '22 18:09 dacbd

Potential duplicate of / related to https://github.com/iterative/cml/issues/1076?

0x2b3bfa0 avatar Sep 08 '22 18:09 0x2b3bfa0

related but different enough

dacbd avatar Sep 08 '22 19:09 dacbd

Ok, so if two different workflows call cml comment create --update, we'd want them to update the comments these workflows originally created, right?

What if the same github workflow is run multiple times, only ever calling cml comment create --update - should it be updating the same comment?

I think we should avoid giving users too much rope (in the form of command flags) and just define several use cases we support.

tasdomas avatar Sep 12 '22 15:09 tasdomas

if two different workflows call cml comment create --update, we'd want them to update the comments these workflows originally created, right?

Yes, that's the goal of this issue.

0x2b3bfa0 avatar Sep 12 '22 15:09 0x2b3bfa0

What if the same github workflow is run multiple times, only ever calling cml comment create --update - should it be updating the same comment?

That's what it currently does, but this use case is unavoidably prone to race conditions.

0x2b3bfa0 avatar Sep 12 '22 15:09 0x2b3bfa0

It could be a lot simpler and less race-prone if we limited comment update to updating comments created by this action run only. Would that be too limiting?

tasdomas avatar Sep 12 '22 16:09 tasdomas

It could be a lot simpler and less race-prone if we limited comment update to updating comments created by this action run only. Would that be too limiting?

If there were multiple comment create's in a single workflow this would make sense. Where this causes issues is with pull_request type events. Where there might be several runs of a workflow for a single PR either via multiple workflows or the user pushes additional commits retriggering the event. For this case in order to prevent extra bash scripting a single create_or_update type function is needed.

dacbd avatar Sep 12 '22 23:09 dacbd

How different s going to be the wartermark? Studio needs the CML waterrmarks to be able to extract the CML report.

DavidGOrtega avatar Sep 13 '22 07:09 DavidGOrtega