Skip to content

feat: Add a new input flag to avoid commenting on stacks that have not changed.#85

Closed
drew-rsk wants to merge 3 commits intocorymhall:mainfrom
drew-rsk:drew/ignore-unchanged-stacks
Closed

feat: Add a new input flag to avoid commenting on stacks that have not changed.#85
drew-rsk wants to merge 3 commits intocorymhall:mainfrom
drew-rsk:drew/ignore-unchanged-stacks

Conversation

@drew-rsk
Copy link
Copy Markdown

Adds a flag to allow users to skip comments for stacks that have not changed.

@drew-rsk drew-rsk changed the title Add a new input flag to avoid commenting on stacks that have not changed. feat(): Add a new input flag to avoid commenting on stacks that have not changed. Sep 26, 2024
@drew-rsk drew-rsk changed the title feat(): Add a new input flag to avoid commenting on stacks that have not changed. feat(cdk-diff-action-86): Add a new input flag to avoid commenting on stacks that have not changed. Sep 26, 2024
@drew-rsk drew-rsk changed the title feat(cdk-diff-action-86): Add a new input flag to avoid commenting on stacks that have not changed. feat(cdk-diff-action-3): Add a new input flag to avoid commenting on stacks that have not changed. Sep 26, 2024
@drew-rsk drew-rsk marked this pull request as ready for review September 26, 2024 18:15
@corymhall corymhall enabled auto-merge (squash) September 26, 2024 18:15
auto-merge was automatically disabled September 26, 2024 18:26

Head branch was pushed to by a user without write access

@drew-rsk drew-rsk changed the title feat(cdk-diff-action-3): Add a new input flag to avoid commenting on stacks that have not changed. feat: Add a new input flag to avoid commenting on stacks that have not changed. Sep 26, 2024
Copy link
Copy Markdown
Owner

@corymhall corymhall left a comment

Choose a reason for hiding this comment

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

@drew-rsk overall the PR looks good! The only thing missing is adding the new input property to the action metadata here

actionMetadata: {

I'm a little hesitant to add this feature as is because I'm worried that it creates a scenario where something could fail to process and the user would think that it was because the stack had no changes.

What would you think about having a single summary comment that has info on what stages/stacks were processed? It could just be a single comment saying that stacks x,y,z had no changes.

@drew-rsk
Copy link
Copy Markdown
Author

drew-rsk commented Sep 30, 2024

@drew-rsk overall the PR looks good! The only thing missing is adding the new input property to the action metadata here

actionMetadata: {

I'm a little hesitant to add this feature as is because I'm worried that it creates a scenario where something could fail to process and the user would think that it was because the stack had no changes.

What would you think about having a single summary comment that has info on what stages/stacks were processed? It could just be a single comment saying that stacks x,y,z had no changes.

@corymhall

Q1: Yeah that'd be a good step and possibly sufficient for my team's development purposes. How can I play with my changes as they are, or any other PR's changes, as a way to manually inspect the results?

Q2: I propose leaving this PR as is and working up an independent one that does what you suggest over hacking this one into a different functional solution. How does that plan suit you?

@corymhall
Copy link
Copy Markdown
Owner

Q1: Yeah that'd be a good step and possibly sufficient for my team's development purposes. How can I play with my changes as they are, or any other PR's changes, as a way to manually inspect the results?

You can pin an action to a branch if you want to test. Something like this should work.

- name: Diff
        uses: corymhall/cdk-diff-action@drew-rsk:drew/ignore-unchanged-stacks

Q2: I propose leaving this PR as is and working up an independent one that does what you suggest over hacking this one into a different functional solution. How does that plan suit you?

I'm not sure what you are asking here. I'm not comfortable merging this PR as is because I think we need to have some kind of indication that all stacks were processed.

@rantoniuk
Copy link
Copy Markdown
Contributor

What would you think about having a single summary comment that has info on what stages/stacks were processed? It could just be a single comment saying that stacks x,y,z had no changes.

Right now it's actually unclear when the comment was generated/updated and it's only visible upon clicking the dropdown on the comment box.

I would say that the comment should look like this:

No changes detected. <--- only in case no stacks have a difference

Generated for commit X (timestamp) <--- added timestamp here

@corymhall
Copy link
Copy Markdown
Owner

corymhall commented May 6, 2025

I would say that the comment should look like this:

Yeah I think adding a timestamp makes sense. I'm going to create a new issue to track this.

@rantoniuk
Copy link
Copy Markdown
Contributor

Please re-open this - adding the timestamp does not fulfill/replace the need of the input for no stack changes.

@corymhall
Copy link
Copy Markdown
Owner

@rantoniuk we currently always comment with the status of each stack (with/without changes). This PR was wanting to remove commenting altogether when stacks have no changes which we are not going to do. There is an existing issue to track that request #86 which we can continue that discussion.

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.

3 participants