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

Support multiple editable PR comments: Bug for Monrepos and Matrix Stategy actions #563

Closed
liqnuks opened this issue Apr 5, 2022 · 2 comments · Fixed by #755
Closed
Assignees
Labels
area/cicd good-first-issue Start here if you'd like to start contributing to Pulumi help-wanted We'd love your contributions on this issue impact/reliability Something that feels unreliable or flaky kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed size/S Estimated effort to complete (1-2 days).
Milestone

Comments

@liqnuks
Copy link

liqnuks commented Apr 5, 2022

Hello!

  • Vote on this issue by adding a 👍 reaction
  • To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already)

Issue details

On Github Actions, if we use a matrix strategy to run a preview on PR, with comment-on-pr = true (and edit-pr-comment = true, the default value), for each check, the comment will override the same comment, resulting in at the end of the workflow, we have only one preview result: the last finished run.

Steps to reproduce

On preview workflow:

  preview:
    name: Pulumi - Preview
    runs-on: ubuntu-latest
    strategy:
      matrix:
        app: ["app1", "app2"]
    steps:
[...]
    - uses: pulumi/actions@v3
      with:
        command: preview
        comment-on-pr: true
        work-dir: ${{ matrix.app }}
[...]

Expected:

Have 1 comment on PR, for each matrix value (here, 2)

Actual:

The same comment is updated for each matrix value
image

Workaround:

Set edit-pr-comment to false, but the PR will be commented for each matrix value and each run of the pipeline... it can be verbose

  preview:
    name: Pulumi - Preview
    runs-on: ubuntu-latest
    strategy:
      matrix:
        app: ["app1", "app2"]
    steps:
[...]
    - uses: pulumi/actions@v3
      with:
        command: preview
        comment-on-pr: true
        edit-pr-comment: false
        work-dir: ${{ matrix.app }}
[...]
@liqnuks liqnuks added the kind/bug Some behavior is incorrect or out of spec label Apr 5, 2022
@mikhailshilkov mikhailshilkov added kind/enhancement Improvements or new features and removed kind/bug Some behavior is incorrect or out of spec labels Apr 6, 2022
@mikhailshilkov mikhailshilkov changed the title Only 1 comment on PR for Github Actions with matrix strategy Support multiple editable PR comments for Github Actions with matrix strategy Apr 6, 2022
@ghost
Copy link

ghost commented May 24, 2022

I’m having a related problem. I’m also using a matrix, but when I set edit-pr-comment to true the action continues to post new comments (one per job variant) rather than update the existing comments. I’m using 5373458 (because I wanted the “folded” comment body feature).

I’ve tried debugging — I even tried making a fork and adding some debugging — but I can’t figure out why it isn’t working.

Should I open a new issue for my version of this problem?

@RobbieMcKinstry
Copy link
Contributor

@miguel-botelho proposed a good solution in #754
As illustrated by Miguel's point, this is a problem for repos using a monorepo, not use those using the matrix-strategy. I'm going to update the title to reflect that.

@RobbieMcKinstry RobbieMcKinstry changed the title Support multiple editable PR comments for Github Actions with matrix strategy Support multiple editable PR comments: Bug for Monrepos and Matrix Stategy actions Oct 14, 2022
@RobbieMcKinstry RobbieMcKinstry added help-wanted We'd love your contributions on this issue good-first-issue Start here if you'd like to start contributing to Pulumi kind/bug Some behavior is incorrect or out of spec impact/reliability Something that feels unreliable or flaky size/S Estimated effort to complete (1-2 days). area/cicd and removed kind/enhancement Improvements or new features labels Oct 14, 2022
@RobbieMcKinstry RobbieMcKinstry added this to the 0.80 milestone Oct 14, 2022
@RobbieMcKinstry RobbieMcKinstry self-assigned this Oct 14, 2022
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cicd good-first-issue Start here if you'd like to start contributing to Pulumi help-wanted We'd love your contributions on this issue impact/reliability Something that feels unreliable or flaky kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed size/S Estimated effort to complete (1-2 days).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants