Skip to content

[SDK-706] Replace deep-link AsyncTask with SDK executors - #1094

Open
franco-zalamena-iterable wants to merge 4 commits into
feature/sdk-705-push-registration-executorfrom
feature/sdk-706-deeplink-redirect-executor
Open

franco-zalamena-iterable wants to merge 4 commits into
feature/sdk-705-push-registration-executorfrom
feature/sdk-706-deeplink-redirect-executor

Conversation

@franco-zalamena-iterable

@franco-zalamena-iterable franco-zalamena-iterable commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

📝 Summary

Moves Iterable deep-link redirect work off the process-wide AsyncTask queue while preserving callback behavior.

🎟️ Jira Ticket: SDK-706

📖 Description

  • Replaces the deep-link redirect AsyncTask with an SDK-owned serial executor.
  • Resolves redirects and attribution cookies in a focused Kotlin resolver.
  • Delivers client callbacks and attribution updates on the main thread, preserving their existing order.
  • Adds deterministic, public-flow tests for redirect outcomes, attribution, callback threading, operation ordering, protocol filtering, and handleAppLink behavior.
  • Replaces the ignored live-network handleAppLink test with MockWebServer coverage.

This PR is stacked on #1093 (SDK-705).

🧪 How to test?

Passed:

  • ./gradlew --no-daemon :iterableapi:testDebugUnitTest :iterableapi-ui:testDebugUnitTest
  • ./gradlew --no-daemon :iterableapi:lintDebug :iterableapi:checkstyle :iterableapi-ui:assembleDebug :app:testDebugUnitTest
  • Focused deep-link suite: 11 tests, 0 failures

The required standalone inbox-customization sample still fails on its existing Kotlin language-version mismatch: the sample uses Kotlin 1.8 while iterableapi-ui contains Kotlin 1.9 data object declarations.

🧾 Changelog

Updated the existing executor entry to include Iterable deep-link redirects and preserved main-thread callbacks.

📹 Loom recording if applicable

Not applicable.

🐞 Github Issues solved

None.

📚 Docs PR if applicable

Not applicable.

@franco-zalamena-iterable
franco-zalamena-iterable requested a review from a team as a code owner September 17, 2026 14:59
@franco-zalamena-iterable
franco-zalamena-iterable added this pull request to stack #1095 September 17, 2026 15:00
@franco-zalamena-iterable
franco-zalamena-iterable force-pushed the feature/sdk-706-deeplink-redirect-executor branch from 9673361 to 8fe0331 Compare September 23, 2026 09:22
@joaodordio
joaodordio requested a review from rtlsilva September 23, 2026 10:24
@franco-zalamena-iterable
franco-zalamena-iterable force-pushed the feature/sdk-706-deeplink-redirect-executor branch from 8fe0331 to 8563c92 Compare September 23, 2026 12:37
@franco-zalamena-iterable

Copy link
Copy Markdown
Contributor Author

Stack review update after the rebase:

  • Deep-link redirects use their own dedicated serial lane, separate from push work.
  • Success, server-failure, and deterministic read-timeout coverage enforce callback delivery on the main looper and fallback to the original URL.
  • A blocked redirect is covered as not delaying push work.
  • The existing review discussion is preserved.

Check, BCIT, instrumentation, changelog, Java analysis, and CodeQL passed. I have rerun the unit job after its notification-image and request-ordering failures; the updated top branch passes the affected request tests locally.

Ready for another review.

@franco-zalamena-iterable

Copy link
Copy Markdown
Contributor Author

Rerun follow-up: instrumentation remains green, and the unit rerun now fails only on the repository-wide external IterableNotificationTest.testNotificationImage assertion. The earlier request-ordering failure did not recur.

val attribution = parseAttributionCookies(connection)

return IterableDeeplinkRedirectResult(
redirectUrl,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every 3xx response passes getHeaderField("Location") directly to nullable redirectUrl.
If the header is missing or blank, that violates the failure fallback contract to return the original URL, and handleAppLink then creates no action, so the link is silently not opened.

Suggest treating a missing or blank Location as a failed redirect and return originalUrl, with coverage that also asserts main-thread delivery.

@franco-zalamena-iterable
franco-zalamena-iterable force-pushed the feature/sdk-706-deeplink-redirect-executor branch from 8563c92 to cb4710b Compare October 2, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants