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

Fix generate comment diff processor build failure #10164

Merged
merged 22 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c32bac6
Refactored generate_comment to continue in the face of errors
melinath Mar 11, 2024
3c361a6
Moved to structured data for diffs
melinath Mar 11, 2024
7bb79f1
Added basic tests for comment formatting
melinath Mar 11, 2024
46f1da8
Skipped missing tests and breaking changes if repo failed to clone
melinath Mar 11, 2024
596d1eb
Force generation
melinath Mar 11, 2024
fb04ad4
Breaking change
melinath Mar 11, 2024
856bd74
Fixed error display in diff comment
melinath Mar 11, 2024
cfb5ab5
Marked diff-processor targets as not being real files
melinath Mar 11, 2024
3a2960e
Added PATH to diffProcessorEnv
melinath Mar 11, 2024
53cc86d
Fixed formatting for error sections
melinath Mar 11, 2024
210d246
Cleaned up passthrough env var usage
melinath Mar 11, 2024
0ca59a5
Made exec.sh exit 1 if there are any errors running the magician
melinath Mar 11, 2024
168b050
Don't error on initial build of the magician binary
melinath Mar 12, 2024
c7d7082
Added missing env var for diff processor build
melinath Mar 12, 2024
fcb65f1
Force generation of tf-oics
melinath Mar 12, 2024
9838115
Revert "Force generation of tf-oics"
melinath Mar 12, 2024
942a2dd
Revert "Force generation"
melinath Mar 12, 2024
c5e1118
Revert "Breaking change"
melinath Mar 12, 2024
90e664a
Force missing test run
melinath Mar 12, 2024
34f7d16
force missing tests to run - take 2
melinath Mar 13, 2024
ba4e8de
Revert "force missing tests to run - take 2"
melinath Mar 13, 2024
a56056e
Revert "Force missing test run"
melinath Mar 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .ci/magician/cmd/DIFF_COMMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Hi there, I'm the Modular magician. I've detected the following information about your changes:

## Diff report
{{ $diffsLength := len .Diffs }}{{if eq $diffsLength 0 }}
Your PR hasn't generated any diffs, but I'll let you know if a future commit does.
{{else}}
Your PR generated some diffs in downstreams - here they are.

{{range .Diffs -}}
{{.Title}}: [Diff](https://github.com/modular-magician/{{.Repo}}/compare/auto-pr-{{$.PrNumber}}-old..auto-pr-{{$.PrNumber}}) ({{.DiffStats}})
{{end -}}
{{end -}}

{{- $breakingChangesLength := len .BreakingChanges }}
{{- if gt $breakingChangesLength 0}}
## Breaking Change(s) Detected

The following breaking change(s) were detected within your pull request.

{{- range .BreakingChanges}}
- {{.}}{{end}}

If you believe this detection to be incorrect please raise the concern with your reviewer.
If you intend to make this change you will need to wait for a [major release](https://www.terraform.io/plugin/sdkv2/best-practices/versioning#example-major-number-increments) window.
An `override-breaking-change` label can be added to allow merging.
{{end}}
{{.MissingTests}}
{{- $errorsLength := len .Errors}}
{{- if gt $errorsLength 0}}
## Errors
{{range .Errors}}
{{.Title}}:
{{- range .Errors}}
- {{.}}{{end}}
{{end}}
{{- end -}}
Loading
Loading