Skip to content

fix: commit pending proposals recovery strategy - WPB-23159#4254

Open
netbe wants to merge 10 commits intorelease/cycle-4.15from
fix/commit-pending-proposals-WPB-23159
Open

fix: commit pending proposals recovery strategy - WPB-23159#4254
netbe wants to merge 10 commits intorelease/cycle-4.15from
fix/commit-pending-proposals-WPB-23159

Conversation

@netbe
Copy link
Collaborator

@netbe netbe commented Feb 3, 2026

TaskWPB-23159 [iOS] Change Commit Pending Proposals recovery

Issue

  • clear commit pending proposal date when mls reset
  • change recovery strategy to a backoff retry instead of retryaftersync
  • avoid sending commit to non existing groups
  • clear scheduled items from workAgent queue when sync is suspended. These will be recreated if needed.
  • cleanup setup initiate mls reset use case
  • improve debugging workAgent item (changed ids)

Testing


Checklist

  • Title contains a reference JIRA issue number like [WPB-XXX].
  • Description is filled and free of optional paragraphs.
  • Adds/updates automated tests.

UI accessibility checklist

If your PR includes UI changes, please utilize this checklist:

  • Make sure you use the API for UI elements that support large fonts.
  • All colors are taken from WireDesign.ColorTheme or constructed using WireDesign.BaseColorPalette.
  • New UI elements have Accessibility strings for VoiceOver.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Test Results

   16 files  1 186 suites   11m 17s ⏱️
8 745 tests 8 715 ✅ 28 💤 2 ❌
8 757 runs  8 729 ✅ 28 💤 0 ❌

For more details on these failures, see this check.

Results for commit 93c2b24.

♻️ This comment has been updated with latest results.

Summary: workflow run #21706682407
Allure report (download zip): html-report-27562-fix_commit-pending-proposals-WPB-23159

@netbe netbe requested review from johnxnguyen and samwyndham and removed request for johnxnguyen February 3, 2026 13:37
@datadog-wireapp
Copy link

datadog-wireapp bot commented Feb 3, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 82adc38 | Docs | Was this helpful? Give us feedback!

case .retryAfterBackoff:

throw MLSRetryError.retryLimitReached
try await BackoffRetrier(policy: .init(maxRetries: 2)).retry { [logger] in
Copy link
Collaborator

Choose a reason for hiding this comment

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

issue: the backoff retrier internally sets up observation of the network reachability and will reset under certain conditions, we may need to decouple that from the retrier and place it in the sync agent where I think it's relevant.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

for now i simply disable it for this case

Copy link
Contributor

@samwyndham samwyndham left a comment

Choose a reason for hiding this comment

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

@netbe Remember to re-target this to 4.15 release branch

@netbe netbe changed the base branch from release/cycle-4.14 to release/cycle-4.15 February 4, 2026 14:11
@netbe netbe force-pushed the fix/commit-pending-proposals-WPB-23159 branch from 82adc38 to 0369bbd Compare February 4, 2026 14:43
Copy link
Contributor

@samwyndham samwyndham left a comment

Choose a reason for hiding this comment

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

Looks good. I've added just a couple of comments before approval

throw MLSRetryError.retryLimitReached
try await BackoffRetrier(policy: .init(maxRetries: 2), monitoringNetwork: false).retry { [logger] in
logger.warn(
"failed to send commit due to \(reason). retrying operation with backoff - attempt: \(retryCount)...",
Copy link
Contributor

Choose a reason for hiding this comment

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

sanity check: Is retryCount here correct considering the use of the BackoffRetrier?

struct RepairFaultyMLSRemovalKeysWorkItem: WorkItem {

let id = UUID()
var id: String {
Copy link
Contributor

Choose a reason for hiding this comment

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

question: What is the purpose of making this a string?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

when we log item in workAgent only the id is visible, which makes it hard to know what kind of item is dropped / failed / started. I wanted something to help with it so basically including more info in the logs

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. I would personally be tempted to make WorkItem conform to LogConvertible or something like that. But I don't have a good argument why. Feel free to disregard this comment.

@netbe netbe requested a review from samwyndham February 5, 2026 09:46
Copy link
Contributor

@samwyndham samwyndham left a comment

Choose a reason for hiding this comment

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

Nice work

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