[SDK-705] IterablePushRegistrationTask as Runnable instead of AsyncTask - #1093
franco-zalamena-iterable wants to merge 8 commits into
Conversation
696e808 to
160504f
Compare
|
Stack review update after the rebase:
Check, BCIT, changelog, Java analysis, and the main build job passed. I have rerun the two failed jobs after confirming their failures were the external notification-image assertion and one instrumentation response timeout. Ready for another review. |
|
Rerun follow-up: the unit job now fails only on the repository-wide external IterableNotificationTest.testNotificationImage assertion. The instrumentation rerun reproduced the lower-stack AsyncTask response timeout in IterableApiResponseTest; that suite passes on SDK-706 once the deep-link lane is separated and passes on SDK-707 after request AsyncTask is removed. The push ordering coverage and BCIT remain green. |
|
@rtlsilva SDK-705 is ready for re-review in 8d7e9e3. The ordering concern is now handled across the complete push flow: registration and disable submissions, HTTP work, 5xx retries, and JWT retries remain on the SDK-owned serial push lane, while newer actions invalidate stale retries. General online requests are restored to their original thread-pool behavior, and push callbacks remain on main. The previous CodeQL findings were caused by newly added deprecated AsyncTask calls; those additions are gone from the final diff. Focused behavior tests, UI unit tests, static checks, root consumer tests, and Android-test compilation pass. CI is now running on the updated commit. |
8d7e9e3 to
50030e0
Compare
| unknownUserManager.trackUnknownTokenRegistration(deviceToken); | ||
| } | ||
| return; | ||
| registerDeviceToken(email, userId, authToken, applicationName, deviceToken, deviceAttributes, runnable -> new Thread(runnable).start()); |
There was a problem hiding this comment.
This default path still starts a separate thread before submitting the registration request, so an immediately following disablePush() can enqueue first and overtake a manual registerDeviceToken() call.
That leaves the public registration path outside the dedicated serial registration/disable lane described by this PR.
Suggest submitting it through the push executor and adding deterministic registerDeviceToken() → disablePush() ordering test coverage.
There was a problem hiding this comment.
Addressed in fc4b5d7. The default manual registerDeviceToken(token) path now enters IterableExecutors.push(), while the automatic registration task keeps using Runnable::run because it is already executing on that lane. This preserves registration-before-disable submission order in both paths. Added a deterministic public-flow test that calls registerDeviceToken(token) followed immediately by disablePush() and verifies /registerDeviceToken is received before /disableDevice.
Summary
Jira: SDK-705
Replaces push registration AsyncTask orchestration with SDK-owned executors while preserving production behavior and rapid login/logout ordering.
Behavior
Compatibility
Verification