Closed cortinico closed 5 months ago
cc @pvinis
Hm, the submodule thing is weird. I will investigate a bit.
Good to know that just regenerating fixed this ๐.
Also, pruning is a nice idea. maybe generating back to like 10 minor version for each new is something that would help so that 0.20->0.74 doesnt happen, and if you do need to do this jump, you do it like 0.20->0.30->0.40->....->0.70->0.74.
Or do you mean removing any diff older than some version X.Y.Z?
Or do you mean removing any diff older than some version X.Y.Z?
I think we could just remove everything from this repo that is older than 0.50
The problem is also that git cloning and checking out the diffs
branch takes 10 minutes
On it ๐. No need to archive anywhere, if we need them, they will be on the history.
Ok, updating here with what I did, and closing the issue. Anything else, please ping me.
0.50.0
. Commit: https://github.com/react-native-community/rn-diff-purge/commit/e87424cad74a4e584b60ff5d3958a3b4d7a6024bBasically at some point (I'm guessing very recently) when running npx react-native init
, a git repo is generated for you. Either the template or the cli. When the new-release.sh
script was running, it starts a new branch for the new release, and runs npx react-native init. Before it was not creating a git repo, so we could just git add
all files and then run the diffs, but now we need to rm -rf
the newly created .git
dir within that newly init-ed app, and then continue with our flow as normal. Added line: https://github.com/react-native-community/rn-diff-purge/blob/master/scripts/new-release.sh#L60
Amazing thanks for fixing it so quickly @pvinis ๐
Yesterday, during the release of 0.74.0, we faced an incident where the diffs for such version where generated as empty.
The upgrade helper looked as follows:
Root Cause Investigation
Apparently the reason was that the RnDiffApp was empty.
Specifically the
release/0.74.0
branch was generated, but theRnDiffApp
was a git submodule (why?). Here the commit where the RnDiffApp for 0.74.0 was generated:https://github.com/react-native-community/rn-diff-purge/commit/2ce7e79a4cdde1600f429af9a9818745509cff14
I'm unsure why this happened, but we'll need to investigate further, as this could affect future releases.
Remediation
I've force pushed
release/0.74.0
to the HEAD ofrelease/0.74.0-rc.9
+ I've applied manually the changes to patch the template. See https://github.com/react-native-community/rn-diff-purge/commits/release/0.74.0/I've also had to regenerate the diffs for all the react-native version, which was really painful as we have 180K diffs (I believe they should be pruned, as generating the diff from 0.20.0 to 0.74.0 is pointless at this stage).
I had to manually force the diff re-creation in this way: https://github.com/react-native-community/rn-diff-purge/commit/4ff103a9cdb0532bb63395116bd1bd3fa9e27369
I've reverted my commit on main to force diff recreation.
Can we fix this for good?