Skip to content

Conversation

@kahest
Copy link
Contributor

@kahest kahest commented Sep 27, 2024

📜 Description

Implement a mechanism that automatically adds an "alert" comment to PRs if they include changes to files we think have higher potential to break things than others.

💡 Motivation and Context

same as getsentry/sentry-java#3726

💚 How did you test it?

✅ by adding the file-filter.yml introduced in this PR to the list of potentially risky changes and ensuring that an alert is shown
Screenshot 2024-09-27 at 16 08 33

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPii is enabled
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

🔮 Next steps

#skip-changelog

@github-actions
Copy link
Contributor

github-actions bot commented Sep 27, 2024

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • .github/file-filters.yml

# This is used by the action https://github.com/dorny/paths-filter

high_risk_code: &high_risk_code
- ".github/file-filters.yml"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is for testing and will be removed before merging
need to align on set of potentially higher-risk files before merging as well

@kahest kahest marked this pull request as ready for review September 27, 2024 14:09
Copy link
Contributor

@buenaflor buenaflor left a comment

Choose a reason for hiding this comment

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

nice addition 👍

# This is used by the action https://github.com/dorny/paths-filter

high_risk_code: &high_risk_code
- ".github/file-filters.yml"
Copy link
Contributor

Choose a reason for hiding this comment

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

cool!

is this how we reference file paths?

high_risk_code: &high_risk_code
  - "dart/lib/src/risky_file.dart"  
  - "flutter/lib/src/risky_file.dart"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, I'll think about the code paths that would benefit from this

Copy link
Contributor

Choose a reason for hiding this comment

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

What do we define as risky? Is this strictly defined as code paths that are prone to crashing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the way to think about this is - what can break the users in significant ways which is not currently automatically ensured/validated/tested/etc. in a different way - also try to strike a good balance between missing things and over-reporting (I wouldn't expect this warning to need to be shown in every other PR, for example)

@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2024

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 475.82 ms 544.20 ms 68.39 ms
Size 6.49 MiB 7.56 MiB 1.07 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
90a08ea 477.25 ms 534.10 ms 56.85 ms
c57d3b7 413.56 ms 508.80 ms 95.24 ms
4c78360 402.29 ms 462.04 ms 59.76 ms
dd76eef 461.37 ms 540.55 ms 79.18 ms
21562c5 304.31 ms 348.91 ms 44.61 ms
a609134 350.12 ms 404.12 ms 54.00 ms
294b7f0 367.83 ms 430.00 ms 62.17 ms
256df44 447.58 ms 485.84 ms 38.25 ms
103eb14 405.50 ms 444.30 ms 38.80 ms
8fa3934 340.64 ms 407.92 ms 67.28 ms

App size

Revision Plain With Sentry Diff
90a08ea 6.49 MiB 7.55 MiB 1.06 MiB
c57d3b7 6.33 MiB 7.30 MiB 992.08 KiB
4c78360 6.33 MiB 7.27 MiB 954.08 KiB
dd76eef 6.35 MiB 7.40 MiB 1.05 MiB
21562c5 6.16 MiB 7.13 MiB 1001.31 KiB
a609134 5.94 MiB 6.95 MiB 1.01 MiB
294b7f0 6.33 MiB 7.26 MiB 950.21 KiB
256df44 6.52 MiB 7.59 MiB 1.06 MiB
103eb14 6.52 MiB 7.59 MiB 1.06 MiB
8fa3934 6.06 MiB 7.09 MiB 1.03 MiB

Previous results on branch: kahest/warn-high-risk-code

Startup times

Revision Plain With Sentry Diff
3682be5 460.78 ms 508.58 ms 47.81 ms

App size

Revision Plain With Sentry Diff
3682be5 6.49 MiB 7.56 MiB 1.07 MiB

@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2024

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1240.96 ms 1249.04 ms 8.08 ms
Size 8.38 MiB 9.74 MiB 1.36 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
24b6e60 1250.69 ms 1268.63 ms 17.94 ms
2e1e4ae 1254.41 ms 1278.55 ms 24.14 ms
6a5a65d 1237.22 ms 1250.29 ms 13.07 ms
73d70bf 1249.08 ms 1268.41 ms 19.33 ms
7faee57 1232.65 ms 1246.10 ms 13.45 ms
43760f9 1216.07 ms 1238.51 ms 22.44 ms
6daa837 1250.42 ms 1265.60 ms 15.18 ms
d4120ac 1260.61 ms 1274.09 ms 13.47 ms
d883d62 1221.39 ms 1230.18 ms 8.80 ms
43abc4f 1248.33 ms 1272.86 ms 24.52 ms

App size

Revision Plain With Sentry Diff
24b6e60 8.32 MiB 9.38 MiB 1.06 MiB
2e1e4ae 8.34 MiB 9.65 MiB 1.31 MiB
6a5a65d 8.34 MiB 9.65 MiB 1.31 MiB
73d70bf 8.38 MiB 9.70 MiB 1.33 MiB
7faee57 8.33 MiB 9.64 MiB 1.31 MiB
43760f9 8.29 MiB 9.36 MiB 1.07 MiB
6daa837 8.33 MiB 9.40 MiB 1.07 MiB
d4120ac 8.28 MiB 9.34 MiB 1.06 MiB
d883d62 8.29 MiB 9.36 MiB 1.07 MiB
43abc4f 8.33 MiB 9.54 MiB 1.21 MiB

Previous results on branch: kahest/warn-high-risk-code

Startup times

Revision Plain With Sentry Diff
3682be5 1247.67 ms 1265.29 ms 17.63 ms

App size

Revision Plain With Sentry Diff
3682be5 8.38 MiB 9.74 MiB 1.36 MiB

@kahest
Copy link
Contributor Author

kahest commented Oct 9, 2024

@buenaflor do you have more additions in mind? I wanna wrap this up soon-ish :)

@buenaflor
Copy link
Contributor

No, I was about to write that this is good now :D

If I see something over the next few days that's alarming I'll add it

@kahest
Copy link
Contributor Author

kahest commented Oct 9, 2024

No, I was about to write that this is good now :D

If I see something over the next few days that's alarming I'll add it

cool 👍 this is meant to be a living list anyway, whenever something makes sense to add, we do it. just need a ✅ now 😅

@buenaflor buenaflor merged commit 77b8ba7 into main Oct 9, 2024
@buenaflor buenaflor deleted the kahest/warn-high-risk-code branch October 9, 2024 09:48
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