Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend.ResponseHandler is now @Sendable #2541

Merged
merged 1 commit into from
May 26, 2023
Merged

Conversation

NachoSoto
Copy link
Contributor

This was necessary for a follow-up refactor to #2540. The main change is in Backend, the rest are test changes that are required now that the closure is @Sendable.

@NachoSoto NachoSoto requested a review from a team May 25, 2023 01:18
@NachoSoto NachoSoto marked this pull request as ready for review May 25, 2023 01:18
@codecov
Copy link

codecov bot commented May 25, 2023

Codecov Report

Merging #2541 (50e5ce3) into main (599cfda) will increase coverage by 0.07%.
The diff coverage is 98.43%.

❗ Current head 50e5ce3 differs from pull request most recent head 2eba02c. Consider uploading reports for the commit 2eba02c to get more accurate results

@@            Coverage Diff             @@
##             main    #2541      +/-   ##
==========================================
+ Coverage   87.81%   87.88%   +0.07%     
==========================================
  Files         200      201       +1     
  Lines       13802    13858      +56     
==========================================
+ Hits        12120    12179      +59     
+ Misses       1682     1679       -3     
Impacted Files Coverage Δ
Sources/Misc/Concurrency/OperationDispatcher.swift 65.71% <ø> (ø)
Sources/Networking/Backend.swift 89.13% <ø> (ø)
Sources/Purchasing/Purchases/Purchases.swift 77.53% <92.30%> (+0.24%) ⬆️
...urces/Purchasing/Purchases/TransactionPoster.swift 98.19% <98.19%> (ø)
...s/Purchasing/Purchases/PurchasesOrchestrator.swift 85.04% <100.00%> (-1.46%) ⬇️

... and 8 files with indirect coverage changes

@@ -78,8 +78,6 @@ class BackendSubscriberAttributesTests: TestCase {
// MARK: PostReceipt with subscriberAttributes

func testPostReceiptWithSubscriberAttributesSendsThemCorrectly() throws {
var completionCallCount = 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm so we were not verifying this right? Instead of removing it, should we verify it instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No haha. Yeah I can add it back

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually it's checked by other tests already, so I think it's better to keep this test focused on testing this one thing.

@NachoSoto NachoSoto force-pushed the transaction-poster branch from dce6717 to 0d27ed5 Compare May 25, 2023 20:37
@NachoSoto NachoSoto force-pushed the transaction-poster-2 branch from bd092b3 to 50e5ce3 Compare May 25, 2023 20:37
Base automatically changed from transaction-poster to main May 26, 2023 22:06
This was necessary for a follow-up refactor to #2540.
The main change is in `Backend`, the rest are test changes that are required now that the closure is `@Sendable`.
@NachoSoto NachoSoto force-pushed the transaction-poster-2 branch from 50e5ce3 to 2eba02c Compare May 26, 2023 22:06
@NachoSoto NachoSoto enabled auto-merge (squash) May 26, 2023 22:07
@NachoSoto NachoSoto merged commit 456b96b into main May 26, 2023
@NachoSoto NachoSoto deleted the transaction-poster-2 branch May 26, 2023 22:29
This was referenced May 31, 2023
@NachoSoto NachoSoto mentioned this pull request May 31, 2023
NachoSoto added a commit that referenced this pull request Jun 1, 2023
**This is an automatic release.**

### New Features
* `Offline Entitlements`: use offline-computed `CustomerInfo` when
server is down (#2368) via NachoSoto (@NachoSoto)

### Bugfixes
* `AppleReceipt.debugDescription`: don't pretty-print JSON (#2564) via
NachoSoto (@NachoSoto)
* `SK2StoreProduct`: fix crash on iOS 12 (#2565) via NachoSoto
(@NachoSoto)
* `GetCustomerInfo` posts receipts if there are pending transactions
(#2533) via NachoSoto (@NachoSoto)
### Performance Improvements
* `PurchasedProductsFetcher`: cache current entitlements (#2507) via
NachoSoto (@NachoSoto)
* Performance: new check to ensure serialization / deserialization is
done from background thread (#2496) via NachoSoto (@NachoSoto)
### Dependency Updates
* Bump fastlane from 2.212.2 to 2.213.0 (#2544) via dependabot[bot]
(@dependabot[bot])
### Other Changes
* `CustomerInfoManager`: post all unfinished transactions (#2563) via
NachoSoto (@NachoSoto)
* `PostReceiptOperation`: added ability to also post `AdServices` token
(#2566) via NachoSoto (@NachoSoto)
* `Offline Entitlements`: improved computation log (#2562) via NachoSoto
(@NachoSoto)
* Added `TransactionPoster` tests (#2557) via NachoSoto (@NachoSoto)
* Refactored `TransactionPoster`: removed 2 dependencies and abstracted
parameters (#2542) via NachoSoto (@NachoSoto)
* `CustomerInfoManagerTests`: wait for `getAndCacheCustomerInfo` to
finish (#2555) via NachoSoto (@NachoSoto)
* `StoreTransaction`: implemented `description` (#2556) via NachoSoto
(@NachoSoto)
* `Backend.ResponseHandler` is now `@Sendable` (#2541) via NachoSoto
(@NachoSoto)
* Extracted `TransactionPoster` from `PurchasesOrchestrator` (#2540) via
NachoSoto (@NachoSoto)
* `enableAdServicesAttributionTokenCollection`: added integration test
(#2551) via NachoSoto (@NachoSoto)
* `AttributionPoster`: replaced hardcoded strings with constants (#2548)
via NachoSoto (@NachoSoto)
* `DefaultDecodable`: moved to `Misc/Codable/DefaultDecodable.swift`
(#2528) via NachoSoto (@NachoSoto)
* `CircleCI`: specify device to run `backend_integration_tests` (#2547)
via NachoSoto (@NachoSoto)
* Created `StoreKit2TransactionFetcher` (#2539) via NachoSoto
(@NachoSoto)
* Fix load shedder integration tests (#2546) via Josh Holtz
(@joshdholtz)
* Fix doc on `Offering.getMetadataValue` (#2545) via Josh Holtz
(@joshdholtz)
* Extracted and tested `AsyncSequence.extractValues` (#2538) via
NachoSoto (@NachoSoto)
* `Offline Entitlements`: don't compute offline `CustomerInfo` when
purchasing a consumable products (#2522) via NachoSoto (@NachoSoto)
* `OfflineEntitlementsManager`: disable offline `CustomerInfo` in
observer mode (#2520) via NachoSoto (@NachoSoto)
* `BasePurchasesTests`: fixed leak detection (#2534) via NachoSoto
(@NachoSoto)
* `PurchaseTesterSwiftUI`: added `ProxyView` to `iOS` (#2531) via
NachoSoto (@NachoSoto)
* `PurchasedProductsFetcher`: removed `AppStore.sync` call (#2521) via
NachoSoto (@NachoSoto)
* `PurchaseTesterSwiftUI`: added new window on Mac to manage proxy
(#2518) via NachoSoto (@NachoSoto)
* `PurchasedProductsFetcher`: added log if fetching purchased products
is slow (#2515) via NachoSoto (@NachoSoto)
* `Offline Entitlements`: disable for custom entitlements mode (#2509)
via NachoSoto (@NachoSoto)
* `Offline Entitlements`: fixed iOS 12 tests (#2514) via NachoSoto
(@NachoSoto)
* `PurchasedProductsFetcher`: don't throw errors if purchased products
were found (#2506) via NachoSoto (@NachoSoto)
* `Offline Entitlements`: allow creating offline `CustomerInfo` with
empty `ProductEntitlementMapping` (#2504) via NachoSoto (@NachoSoto)
* `Offline Entitlements`: integration tests (#2501) via NachoSoto
(@NachoSoto)
* `CustomerInfoManager`: don't cache offline `CustomerInfo` (#2378) via
NachoSoto (@NachoSoto)
* `DangerousSettings`: debug-only `forceServerErrors` (#2486) via
NachoSoto (@NachoSoto)
* `CocoapodsInstallation`: fixed `Xcode 14.3.0` issue (#2489) via
NachoSoto (@NachoSoto)
* `CarthageInstallation`: removed workaround (#2488) via NachoSoto
(@NachoSoto)

---------

Co-authored-by: NachoSoto <[email protected]>
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