Skip to content

Commit 46edf94

Browse files
feat(fcm): Migrate topic management to FCM v1 API (#980)
* feat(fcm): Migrate topic management to FCM v1 API * fix(fcm): Prevent headers mutation race condition and deduplicate topic error parsing - Pass a copy of self._fcm_headers in topic management requests to prevent concurrent mutation race conditions in ThreadPoolExecutor. - Extract common error parsing logic from _build_topic_subscription_result_from_requests_error and _build_topic_subscription_result_from_httpx_error into _build_topic_subscription_result. * fix(fcm): Improve topic management performance and fix test lint issues - Hoist URL-encoded topic computation out of the per-token request loops. - Mount an HTTPAdapter with a connection pool size of 100 on the FCM client session. - Fix line length and method signature override lint warnings in test_messaging.py. * fix(fcm): Addressed review improvements for FCM v1 topic management - Added type annotations to public topic management functions and internal methods - Updated HTTP status code mapping (401->UNAUTHENTICATED, 503->UNAVAILABLE, 408/504->DEADLINE_EXCEEDED) and prioritized status codes over free-form message strings - Updated topic regex with \Z to reject trailing newlines - Passed header copies in send, send_each, and send_each_async to prevent concurrency mutations - Added test coverage for status code mapping, async argument validation, prefixed topics, and async batch unsubscribe * chore(fcm): Trigger CI workflows
1 parent cbacb02 commit 46edf94

2 files changed

Lines changed: 903 additions & 26 deletions

File tree

0 commit comments

Comments
 (0)