Skip to content

MOB-22621 | Fetching timeout value from configuration#128

Merged
ishwetansh merged 40 commits intoadobe:dev-v5.3.0from
ishwetansh:fetch-timeout
Feb 19, 2025
Merged

MOB-22621 | Fetching timeout value from configuration#128
ishwetansh merged 40 commits intoadobe:dev-v5.3.0from
ishwetansh:fetch-timeout

Conversation

@ishwetansh
Copy link
Copy Markdown
Contributor

Description

Fetching timeout value from configuration and using it when there is no timeout passed.

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Copy Markdown
Member

@sbenedicadb sbenedicadb left a comment

Choose a reason for hiding this comment

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

i think this approach works, but i don't really like it.

that said, i also don't have a better idea off the top of my head.

@emdobrin and @praveek would you mind thinking about alternative ways to solve this?

@praveek
Copy link
Copy Markdown

praveek commented Feb 12, 2025

i think this approach works, but i don't really like it.

that said, i also don't have a better idea off the top of my head.

@emdobrin and @praveek would you mind thinking about alternative ways to solve this?

Apologies for the delay. I missed the GH notification.

Another way to simplify the logic is to avoid using MobileCore.dispatchWithResponseCallback in the public API layer. Since Core handles the timeout, Optimize should be aware of the timeout when making the API call.

Instead

  1. Optimize extension can dispatch a chained event (not one time response event) that the public API layer listens for and handles the callback itself.
  2. Follow how Edge manages the completion handler. While this bypasses the event hub, it makes the API layer cleaner and ensures a more consistent behaviour.

@ishwetansh ishwetansh changed the base branch from dev-v5.2.1 to dev-v5.2.2 February 14, 2025 10:23
@ishwetansh ishwetansh requested a review from praveek February 18, 2025 18:40
@ishwetansh ishwetansh merged commit 33f7015 into adobe:dev-v5.3.0 Feb 19, 2025
6 checks passed
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.

3 participants