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
{{ message }}
Repository navigation
Ad-hoc builds sometimes have the completely wrong code #81466
testBuild.yml seems to rely on Rock's fingerprint to uniquely identify the native build artifacts for ad-hoc builds, which causes a cache collision across different PRs that happen to have the same native code. This leads to ad-hoc builds on one pr actually containing code from a different PR.
For example, #81437 (comment) and #79473 (comment) are ad-hoc builds on completely different PRs, but link to the exact same S3 URLs
Hi! I suspect the issue happened because we started building ad-hoc builds more frequently (on push to main), and I accidentally allowed them to run in parallel, which doesn’t work well with Rock internals. The gh action checks whether a specific build already exists, and when we re-sign (which we do in these workflows), we add the commit hash to the build name.
In your case, I assume the build was replaced by another parallel build with the same native changes. This shouldn’t happen again, as the fix was merged a few hours ago.
One thing I’m not sure about right now is why the subsequent builds didn’t work for you, since they’re already using the SHA in the name. I’ll try to figure this one #79473 (comment) out
I prepared another fix to put both adhoc workflows (manual + push) into the same concurrency group. Previous fix was focused on new workflow instead of both #81520
I may found potential bug with manual triggered workflows.
It looks like in https://github.com/Expensify/App/actions/runs/21695712840 workflow was triggered for PR 79473, which set REF and properly checkout to create build, but after all it is saved based on GITHUB_SHA pointing to commit from main which triggered workflow:
Main was at commit 4d4f242, therefore GITHUB_SHA = 4d4f242 for the ENTIRE workflow run
Checkout action checks out ee673a9 (from needs.prep.outputs.APP_REF based on PR number)
The working directory HEAD is now ee673a9, building
But even if that’s true, the build was triggered again, so it should have been overwritten or created from scratch after the manual deletion. I’m a bit worried there might be something else going on too.
I'm glad that #81584 helps!
I shared some details here #81520 (comment) and asked for rock team opinion to double check if my conclusions are correct. I believe it would make process safer and results more readable
I prepared PR for gh action and waiting for review there. It should resolve edge case with new fingerprint builds and keep consistent paths/names for adhocs callstackincubator/ios#25. Also it should save some space on remote -> 1 native build (zip) upload per 1 fingerprint.
Update: Waiting for review on this one. I will share the results or prepare action bump if it will be accepted 👍
Reacted by Vit Horacek, Chuck Dries and Rafe Colton
Waiting for next test build to verify also how it behaves for scenario with cached build.
Meanwhile similar PR for android gh actions callstackincubator/android#22
Updated branch to include both App and Mobile-Expensify short sha in identifier section. Already merged, waiting for some runs to double check how its working.
Activity
AndrewGable commentedon Feb 5, 2026
For additional context: The web build worked correctly in the examples above, iOS shows identical S3 URLs after code has changed.
LukasMod commentedon Feb 5, 2026
Hi! I suspect the issue happened because we started building ad-hoc builds more frequently (on push to main), and I accidentally allowed them to run in parallel, which doesn’t work well with Rock internals. The gh action checks whether a specific build already exists, and when we re-sign (which we do in these workflows), we add the commit hash to the build name.
So instead of
https://ad-hoc-expensify-cash.s3.us-east-1.amazonaws.com/rock-artifacts/ad-hoc/rock-android-Adhoc-FINGERPRINT/index.html
it ends up being more like
https://ad-hoc-expensify-cash.s3.us-east-1.amazonaws.com/rock-artifacts/ad-hoc/rock-android-Adhoc-SHA-FINGERPRINT/index.html
In your case, I assume the build was replaced by another parallel build with the same native changes. This shouldn’t happen again, as the fix was merged a few hours ago.
One thing I’m not sure about right now is why the subsequent builds didn’t work for you, since they’re already using the SHA in the name. I’ll try to figure this one #79473 (comment) out
LukasMod commentedon Feb 5, 2026
I prepared another fix to put both adhoc workflows (manual + push) into the same concurrency group. Previous fix was focused on new workflow instead of both #81520
LukasMod commentedon Feb 5, 2026
I may found potential bug with manual triggered workflows.
It looks like in https://github.com/Expensify/App/actions/runs/21695712840 workflow was triggered for PR 79473, which set REF and properly checkout to create build, but after all it is saved based on GITHUB_SHA pointing to commit from main which triggered workflow:
Main was at commit
4d4f242, therefore GITHUB_SHA =4d4f242for the ENTIRE workflow runCheckout action checks out
ee673a9(from needs.prep.outputs.APP_REF based on PR number)The working directory HEAD is now
ee673a9, buildingGITHUB_SHA context variable still equals
4d4f242so https://github.com/callstackincubator/ios/blob/8dcef6cc275e0cf3299f5a97cde5ebd635c887d7/action.yml#L416-L429sets ARTIFACT_NAME to
rock-ios-device-AdHoc-4d4f242-54e89147d28f8e8638773d8a678888d5d25e206bthere is a risk that another workflow may be also triggered for the same GITHUB_SHA and same fingerprint
LukasMod commentedon Feb 5, 2026
But even if that’s true, the build was triggered again, so it should have been overwritten or created from scratch after the manual deletion. I’m a bit worried there might be something else going on too.
There was similar build triggered 15min later from #81465,
which produced ios artifact link: https://ad-hoc-expensify-cash.s3.us-east-1.amazonaws.com/rock-artifacts/ad-hoc/rock-ios-device-AdHoc-4d4f242-54e89147d28f8e8638773d8a678888d5d25e206b/index.html - same as build from this comment #79473 (comment). But based on timings in responses it should not be issue, it was already marked as wrong one (10min before second build finished) 🤔
rafecolton commentedon Feb 5, 2026
Temporary workaround here: #81578
mountiny commentedon Feb 5, 2026
Nice digging Lukasz! I commented on this PR #81520, I am not 100% sure we want to do that, but curious for your take
LukasMod commentedon Feb 6, 2026
I'm glad that #81584 helps!
I shared some details here #81520 (comment) and asked for rock team opinion to double check if my conclusions are correct. I believe it would make process safer and results more readable
LukasMod commentedon Feb 11, 2026
I prepared PR for gh action and waiting for review there. It should resolve edge case with new fingerprint builds and keep consistent paths/names for adhocs callstackincubator/ios#25. Also it should save some space on remote -> 1 native build (zip) upload per 1 fingerprint.
Update: Waiting for review on this one. I will share the results or prepare action bump if it will be accepted 👍
LukasMod commentedon Feb 13, 2026
iOS action already merged. Testing how it works with #82391
For fresh build it worked as planned ✅
zip artifact (reused, no identifier in name): https://ad-hoc-expensify-cash.s3.us-east-1.amazonaws.com/rock-artifacts/rock-ios-device-AdHoc-fbaf59143f35e8cf884efc354d9e31d29d32fc5d.zip
adhoc build (per commit, identifier in name): https://ad-hoc-expensify-cash.s3.us-east-1.amazonaws.com/rock-artifacts/ad-hoc/rock-ios-device-AdHoc-56f7872bc7ca30ea7127fbb454f2a77d67275c11-fbaf59143f35e8cf884efc354d9e31d29d32fc5d/index.html
Waiting for next test build to verify also how it behaves for scenario with cached build.
Meanwhile similar PR for android gh actions callstackincubator/android#22
LukasMod commentedon Feb 13, 2026
Both scenarios tested on iOS ✅
Android action PR was already merged.
PR with actions bump ready for review: #82391
LukasMod commentedon Feb 16, 2026
Updated branch to include both App and Mobile-Expensify short sha in identifier section. Already merged, waiting for some runs to double check how its working.
LukasMod commentedon Feb 16, 2026
Results looks fine. Correct URLs and Zip upload skipped for cached builds:
Cached build (push flow): https://github.com/Expensify/App/actions/runs/22067407487:
URL Android: https://ad-hoc-expensify-cash.s3.us-east-1.amazonaws.com/rock-artifacts/ad-hoc/rock-android-Adhoc-3c8297f-10bc3c3-643cbe19e975c6defec18817edcb6c93b8c95269/index.html
Cached build (manual flow): https://github.com/Expensify/App/actions/runs/22067727283
URL Android: https://ad-hoc-expensify-cash.s3.us-east-1.amazonaws.com/rock-artifacts/ad-hoc/rock-android-Adhoc-360260a-10bc3c3-fcb8a08c6f86956ecfd6af5d49d91136ad6dc47e/index.html
Fresh build (push flow): https://github.com/Expensify/App/actions/runs/22068138801
URL Android: https://ad-hoc-expensify-cash.s3.us-east-1.amazonaws.com/rock-artifacts/ad-hoc/rock-android-Adhoc-4e5a3bd-0314a64-c31848d3486231c399cb5670844ed0fa92f021ab/index.html
@mountiny I think this issue can be closed now, as there are no new issues regarding mobile ad hoc builds.
mountiny commentedon Feb 16, 2026
Perfect, thanks!