Skip to content

prevent deadlock on background thread access to Flagship singleton#62

Merged
ABTastyAdel merged 18 commits intomasterfrom
fixBugInitBackgroud
Mar 17, 2026
Merged

prevent deadlock on background thread access to Flagship singleton#62
ABTastyAdel merged 18 commits intomasterfrom
fixBugInitBackgroud

Conversation

@ABTastyAdel
Copy link
Copy Markdown
Collaborator

No description provided.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 17, 2026

Codecov Report

❌ Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 85.02%. Comparing base (9c2240b) to head (bf97db2).
⚠️ Report is 21 commits behind head on master.

Files with missing lines Patch % Lines
FlagShip/Source/Core/Flagship.swift 95.23% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #62      +/-   ##
==========================================
+ Coverage   78.31%   85.02%   +6.70%     
==========================================
  Files          70       70              
  Lines        3966     3972       +6     
==========================================
+ Hits         3106     3377     +271     
+ Misses        860      595     -265     
Files with missing lines Coverage Δ
FlagShip/Source/Core/Flagship.swift 93.75% <95.23%> (+0.50%) ⬆️

... and 23 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3ae58eb...bf97db2. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to prevent deadlocks when accessing the Flagship singleton from background threads by adjusting synchronization around shared SDK state, and bumps the SDK version to 4.0.3.

Changes:

  • Introduces queue-protected access for currentConfig/status update logic in Flagship.
  • Adds/adjusts unit tests to cover initialization from a background queue and tweaks a bucketing test callback.
  • Bumps SDK version references (Swift constant, podspec, Xcode marketing version) and updates CI simulator destinations.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
FlagShip/Source/Tools/FlagShipVersion.swift Bumps FlagShipVersion constant to 4.0.3.
FlagShip/Source/Core/Flagship.swift Adds queue-synchronized config/state handling and refactors start config argument.
FlagShip/Flagship.xcodeproj/project.pbxproj Updates MARKETING_VERSION to 4.0.3.
FlagShip/FlagShipTests/FlagshipTests.swift Reformats tests and adds a background-thread init test.
FlagShip/FlagShipTests/FlagshipBucketingTest.swift Adds a conditional around assertions in a fetch callback.
FlagShip.podspec Bumps CocoaPods version to 4.0.3.
.github/workflows/flagship_ci.yml Updates simulator destinations used in CI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

ABTastyAdel and others added 3 commits March 17, 2026 15:20
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

@ABTastyAdel ABTastyAdel merged commit a9cf320 into master Mar 17, 2026
8 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.

2 participants