Skip to content

feat(fcm): add retry config client option support#758

Closed
aminpaydar wants to merge 2 commits intofirebase:masterfrom
aminpaydar:codex-retry-config-option
Closed

feat(fcm): add retry config client option support#758
aminpaydar wants to merge 2 commits intofirebase:masterfrom
aminpaydar:codex-retry-config-option

Conversation

@aminpaydar
Copy link
Copy Markdown

Allow callers to pass retry policy through option.ClientOption so Messaging can honor custom retry behavior from NewApp options. When no retry option is supplied the default retry config is still applied.

Hey there! So you want to contribute to a Firebase SDK?
Before you file this pull request, please read these guidelines:

Discussion

  • Read the contribution guidelines (CONTRIBUTING.md).
  • If this has been discussed in an issue, make sure to link to the issue here.
    If not, go file an issue about this before creating a pull request to discuss.

Testing

  • Make sure all existing tests in the repository pass after your change.
  • If you fixed a bug or added a feature, add a new test to cover your code.

API Changes

  • At this time we cannot accept changes that affect the public API. If you'd like to help
    us make Firebase APIs better, please propose your change in an issue so that we
    can discuss it together.

@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 5, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@aminpaydar aminpaydar force-pushed the codex-retry-config-option branch 2 times, most recently from 81bb30e to 9369129 Compare May 5, 2026 12:31
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the ability to configure HTTP retry behavior for Firebase service clients by adding a public WithRetryConfig option and refactoring the internal HTTP client creation logic. The messaging service has been updated to utilize these configurations. Feedback was provided regarding the cloneHTTPClient function, which performs a shallow copy that may be fragile if default options are added to the internal client in the future.

Comment thread messaging/messaging.go Outdated
@aminpaydar aminpaydar force-pushed the codex-retry-config-option branch 2 times, most recently from b379e17 to 1f5ad18 Compare May 5, 2026 12:37
Allow callers to pass retry policy through option.ClientOption so Messaging can honor custom retry behavior from NewApp options.
When no retry option is supplied the default retry config is still applied.
@aminpaydar aminpaydar force-pushed the codex-retry-config-option branch from 1f5ad18 to 256f074 Compare May 5, 2026 12:38
@aminpaydar aminpaydar marked this pull request as draft May 5, 2026 12:39
Clone internal HTTP clients with copied slice/pointer fields and append messaging-specific headers instead of overwriting options.
This keeps future defaults from internal.NewHTTPClient intact for both FCM and IID clients.
@aminpaydar aminpaydar marked this pull request as ready for review May 5, 2026 13:02
@aminpaydar aminpaydar closed this May 5, 2026
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.

1 participant