You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a very obscure edge case with our git CI that caused some changes on main to not be correctly propagated to staging during a staging deploy. There were a few affected files, but the one we've focused on as our case study is src/pages/settings/Payments/PaymentsPage/BasePaymentsPage.js. Here's my best attempt at summarizing the history of this file.
The change was reverted here. Note that this PR was meant to be a revert of Update Global Offline Indicator #9895, but also included an additional (potentially unrelated) change in BasePaymentsPage.
The revert was cherry-picked to staging version 1.1.86-2 in ffd8581 (#10115)
At this point, main contained the OfflineIndicator in BasePaymentsPage, but staging did not. However, when main was merged into staging, the usage of OfflineIndicator was carried over to main but the import was not.
In order to reproduce this locally and see it in action:
Then look at the diff between update-fake-staging-from-fake-main:
You would think both of these changes would be carried over, but then run:
git merge -Xtheirs fake-main
And you'll see that the import is missing.
Solution
TBD, but we have some additional observations/hypotheses:
When we cherry-picked the revert to staging, we somehow muddled the history such that git thinks that change (ffd8581) is newer than the change on main that added it back (f9cf909).
An examination of the git log shows that on main the commits from the revert PR are part of a linear history, while on staging the merge commit is included and is treated as a separate branch?
The next step to investigate how to prevent this from happening in the future is probably to try and reproduce it in a fresh repo (perhaps utilizing this existing test script), and fiddle with the cherry-pick command that's used to see if we can keep these histories in line and prevent this problem.
Context
Problem
There is a very obscure edge case with our git CI that caused some changes on
mainto not be correctly propagated tostagingduring a staging deploy. There were a few affected files, but the one we've focused on as our case study issrc/pages/settings/Payments/PaymentsPage/BasePaymentsPage.js. Here's my best attempt at summarizing the history of this file.OfflineIndicatorwas added incc59b0a(#9589).1.1.86-0BasePaymentsPage.1.1.86-2inffd8581(#10115)OfflineIndicatorwas added back inf9cf909(#10135)At this point,
maincontained theOfflineIndicatorinBasePaymentsPage, butstagingdid not. However, whenmainwas merged intostaging, the usage ofOfflineIndicatorwas carried over tomainbut the import was not.In order to reproduce this locally and see it in action:
Then look at the diff between
update-fake-staging-from-fake-main:You would think both of these changes would be carried over, but then run:
And you'll see that the
importis missing.Solution
TBD, but we have some additional observations/hypotheses:
staging, we somehow muddled the history such that git thinks that change (ffd8581) is newer than the change on main that added it back (f9cf909).mainthe commits from the revert PR are part of a linear history, while on staging the merge commit is included and is treated as a separate branch?cherry-pickcommand that's used to see if we can keep these histories in line and prevent this problem.