fix: skip push registration in e2e - #1245
Conversation
|
|
The reason for this PR is to reduce the load of push notifications tokens registrations (issue flagged by @dzdidi in thread about staging backend overload by bitkit ci). The issue is also related to missing cleanup in the our notification server, an issue flagged separately in that repo -- cleanup can be done on trigger of deterministic signal returned by the specific platform's notifications delivery server when trying to access it, the returned payload includes a certain error code which our backend can use to ack those devices are never gonna be available anymore in there, so they can be purged. E2E tests never use those anyways but @piotr-iohk can db check to confirm. |
Regtest APKDownload bitkit-dev-debug universal APK (expires in 30 days). |
Closes #1244
This PR skips push notification registration in E2E builds so those wallets stop registering short-lived FCM tokens with the Bitkit notification server.
Description
LightningRepo.registerForNotificationsreturns early with one info log whenEnv.isE2eTestis set. It is the single path for node start,FcmService.onNewToken, and the DevSettings action, so all three skip together. The FCM token fetch and keychain cache are simply not reached; receive-side handling is untouched.Skipped push registrationin E2E builds.E2E=trueis already used in the three E2E APK steps ine2e.ymlande2e_migration.yml, also in plusjust e2e.Limited scope change, nothing relevant of the happy flow is affected because the build flag is not exercised for those builds.
Context: Blocktank staging thread; server-side pruning of dead tokens is synonymdev/bitkit-notification-server#19.
Follow-up: iOS counterpart synonymdev/bitkit-ios#739.
Design
N/A — no UI changes.
Preview
N/A — no user-visible changes.
QA Notes
Manual Tests
just e2e assembleDevDebug→ install → create wallet → node start: log showsSkipped push registration in E2E buildand noRegistering device for notifications…line.regression:just build→ create wallet → node start:registerForNotificationsproceeds to the FCM token fetch as before.just e2e assembleDevDebug→ Settings → Dev Settings → Register For LSP Notifications: toastSkipped push registration.Automated Checks
Env.isE2eTest.Env.isE2eTestis a compile-time constant, so the skip path is exercised by anyE2E=truebuild, including every CI E2E run.just buildandjust lintpass on the current head.