SSWConsulting / SSW.Rules

Generator for ssw.com.au/rules
https://www.ssw.com.au/rules
MIT License
11 stars 12 forks source link

🐛 Huge content change PRs break the history AzFuncs #1367

Closed bradystroud closed 3 weeks ago

bradystroud commented 3 weeks ago

Cc: @JackDevAU

Occasionally we will want to execute some automation that effects every single rule. This results in large PRs.

Discovered when I merged 3000+ files changed for #1307 I had to revert the changes as the big PR caused problems with gathering the history to store in CosmosDB.

e.g. One of the functions tried to get the content for EVERY file changed in each PR - this caused the Function to time out

Also, if there is an automated process running on every rule, recording this in the history would make the data odd and misleading.

e.g. after #1307 I would have been credited for the most recent change on EVERY rule (this data is still in GitHub so its not lost)

### Tasks
- [x] AzFunc - Don't update the widget for giant PRs
- [x] Allow skip of history updates for giant PRs
bradystroud commented 3 weeks ago

Update

First problem was resolved by not updating the widget if the PR changes more than 100 files - this is too many files and would ruin the widget data anyway. It is better to be excluded.

It was resolved by adding a check to the Azure Functions in a few PRs starting with https://github.com/SSWConsulting/SSW.Rules.Functions/pull/52

bradystroud commented 3 weeks ago

Update

Allow skip of history updates for giant PRs

I added this functionality in #1365 I need to test it now

bradystroud commented 3 weeks ago

Done 🍾

There were a bunch of improvement made to get this done, but I think it handles it pretty well now

1365

1376

1375

#1372 SSWConsulting/SSW.Rules.Functions#55