Skip to content

chore(git): Ignore Android SDK replay stub#5226

Closed
antonis wants to merge 3 commits intomainfrom
antonis/git-ignore-android-replay-stub
Closed

chore(git): Ignore Android SDK replay stub#5226
antonis wants to merge 3 commits intomainfrom
antonis/git-ignore-android-replay-stub

Conversation

@antonis
Copy link
Contributor

@antonis antonis commented Sep 30, 2025

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Adds Android SDK stub to gitignore

💡 Motivation and Context

I noticed that this came up as a change on every local build after #5174

💚 How did you test it?

CI, Manual locally

📝 Checklist

  • 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.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

#skip-changelog

@antonis
Copy link
Contributor Author

antonis commented Sep 30, 2025

@romtsn The file is recreated on every build but I'm adding you as a reviewer in case I'm missing something

@github-actions
Copy link
Contributor

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 389.00 ms 401.66 ms 12.66 ms
Size 17.75 MiB 19.69 MiB 1.94 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
23080e5 384.85 ms 382.57 ms -2.28 ms
1853710 555.47 ms 556.59 ms 1.12 ms
77061ed+dirty 369.55 ms 408.35 ms 38.80 ms
20d5eaa 377.62 ms 406.50 ms 28.88 ms
f70acbf+dirty 373.39 ms 382.81 ms 9.43 ms
6479fd5+dirty 412.95 ms 434.02 ms 21.07 ms
8ece263 441.96 ms 444.96 ms 3.00 ms
af9331b 449.77 ms 479.20 ms 29.43 ms
a0b15d6 423.06 ms 437.77 ms 14.71 ms
46da307 455.92 ms 443.79 ms -12.13 ms

App size

Revision Plain With Sentry Diff
23080e5 17.75 MiB 19.68 MiB 1.94 MiB
1853710 17.75 MiB 19.68 MiB 1.94 MiB
77061ed+dirty 17.75 MiB 19.68 MiB 1.94 MiB
20d5eaa 17.75 MiB 20.15 MiB 2.41 MiB
f70acbf+dirty 17.75 MiB 19.68 MiB 1.94 MiB
6479fd5+dirty 17.75 MiB 19.68 MiB 1.94 MiB
8ece263 17.75 MiB 19.68 MiB 1.94 MiB
af9331b 17.75 MiB 19.68 MiB 1.94 MiB
a0b15d6 17.75 MiB 20.15 MiB 2.41 MiB
46da307 17.75 MiB 19.68 MiB 1.93 MiB

@antonis antonis requested a review from romtsn September 30, 2025 12:45
@antonis antonis changed the title chore: Git-Ignore Android SDK replay stub chore(git): Ignore Android SDK replay stub Sep 30, 2025
@github-actions
Copy link
Contributor

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 345.39 ms 403.66 ms 58.27 ms
Size 7.15 MiB 8.42 MiB 1.26 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
77061ed+dirty 359.40 ms 424.10 ms 64.70 ms
95aaf8a+dirty 342.82 ms 393.75 ms 50.93 ms
f70acbf+dirty 520.12 ms 558.91 ms 38.79 ms
6479fd5+dirty 393.06 ms 434.04 ms 40.98 ms
c7f264b+dirty 356.98 ms 407.46 ms 50.48 ms
d916aa3+dirty 411.72 ms 451.76 ms 40.03 ms
20daa0a+dirty 352.33 ms 424.30 ms 71.98 ms
e2fa43d+dirty 326.56 ms 372.88 ms 46.32 ms
785ffb1+dirty 380.65 ms 451.83 ms 71.18 ms
46bd012+dirty 333.76 ms 359.24 ms 25.48 ms

App size

Revision Plain With Sentry Diff
77061ed+dirty 7.15 MiB 8.41 MiB 1.26 MiB
95aaf8a+dirty 7.15 MiB 8.41 MiB 1.26 MiB
f70acbf+dirty 7.15 MiB 8.41 MiB 1.26 MiB
6479fd5+dirty 7.15 MiB 8.41 MiB 1.26 MiB
c7f264b+dirty 7.15 MiB 8.41 MiB 1.26 MiB
d916aa3+dirty 7.15 MiB 8.42 MiB 1.27 MiB
20daa0a+dirty 7.15 MiB 8.42 MiB 1.27 MiB
e2fa43d+dirty 7.15 MiB 8.42 MiB 1.27 MiB
785ffb1+dirty 7.15 MiB 8.42 MiB 1.27 MiB
46bd012+dirty 7.15 MiB 8.42 MiB 1.27 MiB

@romtsn
Copy link
Member

romtsn commented Sep 30, 2025

@antonis hm, actually it should be checked into VCS, otherwise the customer builds will be failing I believe (they will include sentry-react-native, which includes our android folder, which references replay-stubs as compileOnly dependency, but with this change it wouldn't exist?).

Theoretically it shouldn't be recompiled everytime you run yarn build because it should re-use the existing Gradle cache (unless there were changes to the Android SDK).

@github-actions
Copy link
Contributor

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1221.78 ms 1232.14 ms 10.36 ms
Size 3.19 MiB 4.54 MiB 1.36 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
bc9680d+dirty 1228.57 ms 1233.64 ms 5.07 ms
c9e95bd+dirty 1205.83 ms 1207.38 ms 1.55 ms
c1573b3+dirty 1245.69 ms 1245.48 ms -0.21 ms
49ef936+dirty 1221.27 ms 1221.60 ms 0.34 ms
8d89cc9+dirty 1232.35 ms 1228.53 ms -3.82 ms
e2fa43d+dirty 1224.43 ms 1235.40 ms 10.98 ms
9f211e3+dirty 1215.38 ms 1218.15 ms 2.77 ms
7be1f99+dirty 1222.43 ms 1217.15 ms -5.28 ms
21c9e75+dirty 1206.20 ms 1223.54 ms 17.35 ms
5c16cdc+dirty 1235.67 ms 1241.18 ms 5.51 ms

App size

Revision Plain With Sentry Diff
bc9680d+dirty 3.19 MiB 4.38 MiB 1.19 MiB
c9e95bd+dirty 3.19 MiB 4.44 MiB 1.25 MiB
c1573b3+dirty 3.19 MiB 4.38 MiB 1.19 MiB
49ef936+dirty 3.19 MiB 4.54 MiB 1.36 MiB
8d89cc9+dirty 3.19 MiB 4.53 MiB 1.35 MiB
e2fa43d+dirty 3.19 MiB 4.38 MiB 1.19 MiB
9f211e3+dirty 3.19 MiB 4.48 MiB 1.29 MiB
7be1f99+dirty 3.19 MiB 4.38 MiB 1.19 MiB
21c9e75+dirty 3.19 MiB 4.38 MiB 1.19 MiB
5c16cdc+dirty 3.19 MiB 4.53 MiB 1.34 MiB

@github-actions
Copy link
Contributor

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1227.67 ms 1227.92 ms 0.25 ms
Size 2.63 MiB 3.98 MiB 1.34 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
bc9680d+dirty 1221.41 ms 1241.47 ms 20.06 ms
c9e95bd+dirty 1240.19 ms 1246.33 ms 6.14 ms
c1573b3+dirty 1203.33 ms 1202.47 ms -0.86 ms
49ef936+dirty 1228.42 ms 1217.09 ms -11.33 ms
8d89cc9+dirty 1222.92 ms 1239.43 ms 16.51 ms
e2fa43d+dirty 1216.04 ms 1232.65 ms 16.61 ms
9f211e3+dirty 1218.80 ms 1233.88 ms 15.08 ms
7be1f99+dirty 1226.69 ms 1217.76 ms -8.93 ms
21c9e75+dirty 1237.78 ms 1247.66 ms 9.88 ms
5c16cdc+dirty 1209.32 ms 1210.67 ms 1.35 ms

App size

Revision Plain With Sentry Diff
bc9680d+dirty 2.63 MiB 3.81 MiB 1.18 MiB
c9e95bd+dirty 2.63 MiB 3.87 MiB 1.24 MiB
c1573b3+dirty 2.63 MiB 3.81 MiB 1.18 MiB
49ef936+dirty 2.63 MiB 3.98 MiB 1.34 MiB
8d89cc9+dirty 2.63 MiB 3.96 MiB 1.33 MiB
e2fa43d+dirty 2.63 MiB 3.81 MiB 1.18 MiB
9f211e3+dirty 2.63 MiB 3.91 MiB 1.28 MiB
7be1f99+dirty 2.63 MiB 3.81 MiB 1.18 MiB
21c9e75+dirty 2.63 MiB 3.81 MiB 1.18 MiB
5c16cdc+dirty 2.63 MiB 3.96 MiB 1.33 MiB

@antonis
Copy link
Contributor Author

antonis commented Sep 30, 2025

Thank you for the feedback @romtsn 🙇

Theoretically it shouldn't be recompiled everytime you run yarn build because it should re-use the existing Gradle cache

Ok. I'll iterate with another approach to avoid changing the jar if not needed.

(unless there were changes to the Android SDK).

Should the scripts/update-android-stubs.sh also update jar on SDK/stub bumps?

@romtsn
Copy link
Member

romtsn commented Sep 30, 2025

Ok. I'll iterate with another approach to avoid changing the jar if not needed.

I guess you could remove that command from yarn build and just run it as a separate step in CI

Should the scripts/update-android-stubs.sh also update jar on SDK/stub bumps?

ideally yes, but i wanted to avoid dealing with git from CI (would have to commit + push + it's not guaranteed that nothing's broken, so would still need some manual work after all). So this script is more-so to test if the new stubs are compatible with what RN expects and after that requires manually to regenerate them and adapt the RN usage site (if anything changed)

@antonis
Copy link
Contributor Author

antonis commented Sep 30, 2025

ideally yes, but i wanted to avoid dealing with git from CI (would have to commit + push + it's not guaranteed that nothing's broken, so would still need some manual work after all). So this script is more-so to test if the new stubs are compatible with what RN expects and after that requires manually to regenerate them and adapt the RN usage site (if anything changed)

Sounds good @romtsn 👍 Thank you for the clarification.
So after each version bump (like this) we should also commit the new jar artifact.

@romtsn
Copy link
Member

romtsn commented Sep 30, 2025

So after each version bump (like this) we should also commit the new jar artifact.

Right, but as mentioned it shouldn't update too often (if ever). And Gradle should take care of caching and not generating a new .jar if nothing's changed for the stubbed classes.

@antonis
Copy link
Contributor Author

antonis commented Sep 30, 2025

Closing as the .jar file shouldn't be ignored

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.

2 participants