magic-modules icon indicating copy to clipboard operation
magic-modules copied to clipboard

chore(ci): return jsonify breaking change list

Open iyabchen opened this issue 2 months ago • 3 comments

Return json output for breaking change tool output. https://github.com/hashicorp/terraform-provider-google/issues/17635

Release Note Template for Downstream PRs (will be copied)


iyabchen avatar Apr 20 '24 09:04 iyabchen

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR hasn't generated any diffs, but I'll let you know if a future commit does.

modular-magician avatar Apr 20 '24 09:04 modular-magician

The goal of this change is to make it so that we have more control over the display of breaking changes in DIFF_COMMENT.md. Currently part of the formatting is happening as part of the Message method on rules - for example, ResourceInventoryRule.Message makes the main message and then adds a documentation reference to the end.

Instead, it would be great to return metadata about the breaking change (for now, resource, message (or maybe even message template?), docs identifier (or docs link) - I'm not sure whether we will want to keep the name / definition fields long-term and there's not a clear need for them at the moment, but it probably wouldn't hurt to include them either) as a JSON structure and format the display of that data in the DIFF_COMMENT.md template.

I refactor the code to return a struct array, but not sure what benefits it can gain. Some template requires fields like min, max etc, more than just resource and field name. Putting different kinds of template into DIFF_COMMENT.md seems difficult as well. I just put message and document reference field as the template into DIFF_COMMENT.md.

iyabchen avatar Apr 29 '24 22:04 iyabchen

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR hasn't generated any diffs, but I'll let you know if a future commit does.

modular-magician avatar Apr 29 '24 22:04 modular-magician

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR hasn't generated any diffs, but I'll let you know if a future commit does.

modular-magician avatar May 09 '24 02:05 modular-magician

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR hasn't generated any diffs, but I'll let you know if a future commit does.

modular-magician avatar May 09 '24 18:05 modular-magician

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR hasn't generated any diffs, but I'll let you know if a future commit does.

modular-magician avatar May 14 '24 19:05 modular-magician

LGTM - the unit test improvements are great! Could you temporarily add a breaking change to this PR to verify that the generate_comment behavior still works as expected?

Added one space into the DIFF_COMMENT.md file. I generated a breaking change in https://github.com/GoogleCloudPlatform/magic-modules/pull/10692, is that what u meant?

iyabchen avatar May 14 '24 19:05 iyabchen

You could have done it in this PR, but that works as well.

melinath avatar May 14 '24 20:05 melinath