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

Version 0.6.0 #10

Merged
merged 63 commits into from
Aug 21, 2024
Merged

Version 0.6.0 #10

merged 63 commits into from
Aug 21, 2024

Conversation

fpseverino
Copy link
Member

@fpseverino fpseverino commented Jul 17, 2024

  • Complete Pass Personalization implementation
  • Refactor APNs setup and routes registration
  • Change PKPass schema to Pass
  • Move from openssl to swift-certificates for unencrypted private keys
  • Move to vapor-community/Zip for bundle compression
  • Add unit tests
  • Various improvements

@fpseverino fpseverino requested review from gwynne and 0xTim July 17, 2024 10:57
Copy link

codecov bot commented Jul 17, 2024

Codecov Report

Attention: Patch coverage is 95.95238% with 17 lines in your changes missing coverage. Please review.

Project coverage is 94.36%. Comparing base (99fa653) to head (19b3af1).
Report is 6 commits behind head on main.

Files Patch % Lines
...urces/Passes/Models/UserPersonalizationModel.swift 80.00% 8 Missing ⚠️
Sources/Passes/PassesServiceCustom.swift 97.54% 5 Missing ⚠️
Sources/Orders/OrdersServiceCustom.swift 97.70% 3 Missing ⚠️
Sources/Passes/Models/PassModel.swift 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            main      #10       +/-   ##
==========================================
+ Coverage   0.00%   94.36%   +94.36%     
==========================================
  Files         11       33       +22     
  Lines        517     1012      +495     
==========================================
+ Hits           0      955      +955     
+ Misses       517       57      -460     
Files Coverage Δ
Sources/Orders/DTOs/OrdersForDeviceDTO.swift 100.00% <100.00%> (ø)
Sources/Orders/Models/Concrete Models/Order.swift 100.00% <ø> (ø)
Sources/Orders/Models/OrderModel.swift 80.00% <ø> (ø)
Sources/Orders/OrdersDelegate.swift 100.00% <ø> (ø)
Sources/Orders/OrdersError.swift 100.00% <ø> (ø)
Sources/Orders/OrdersService.swift 100.00% <100.00%> (ø)
Sources/PassKit/DTOs/ErrorLogDTO.swift 100.00% <100.00%> (ø)
Sources/PassKit/DTOs/RegistrationDTO.swift 100.00% <100.00%> (ø)
Sources/PassKit/Models/DeviceModel.swift 80.00% <ø> (ø)
Sources/Passes/Models/Concrete Models/Pass.swift 100.00% <100.00%> (ø)
... and 9 more

... and 6 files with indirect coverage changes

@fpseverino fpseverino requested a review from ptoffy July 22, 2024 10:40
ptoffy
ptoffy previously requested changes Jul 23, 2024
Sources/Orders/DTOs/OrderJSON.swift Show resolved Hide resolved
Sources/Orders/Orders.docc/GettingStarted.md Outdated Show resolved Hide resolved
Sources/Orders/Orders.docc/GettingStarted.md Outdated Show resolved Hide resolved
Sources/Passes/Models/Concrete Models/PKPass.swift Outdated Show resolved Hide resolved
Sources/Passes/Passes.docc/GettingStarted.md Outdated Show resolved Hide resolved
Sources/Passes/Passes.docc/Personalization.md Show resolved Hide resolved
Tests/OrdersTests/OrderData.swift Outdated Show resolved Hide resolved
Tests/OrdersTests/OrdersTests.swift Show resolved Hide resolved
Tests/PassesTests/PassData.swift Outdated Show resolved Hide resolved
Tests/PassesTests/PassesTests.swift Show resolved Hide resolved
Copy link
Member

@ptoffy ptoffy left a comment

Choose a reason for hiding this comment

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

It's not particularly easy to review this due to the size of the PR, but it mostly looks good to me besides the @testable stuff

Comment on lines 4 to 5
@testable import Orders
@testable import PassKit
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to remove @testable here and just test the public API? Are there any internals that need to be tested and if so might it make sense to move them to a separate file? cc @0xTim

Copy link
Member Author

@fpseverino fpseverino Aug 16, 2024

Choose a reason for hiding this comment

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

I need to create and encode some package DTOs (defined in the PassKit target, as they are shared) to test Passes and Orders API endpoints

Copy link
Member

Choose a reason for hiding this comment

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

Well if they're package they should be accessible in the tests too right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I added the PassKit target to the dependencies of the test target (previously it was only a dependency of the main Passes and Orders targets) and now it doesn't require @testable.

For Passes and Orders I wouldn't remove the @testable attribute because there are some internals that can be tested

@fpseverino fpseverino requested a review from ptoffy August 19, 2024 09:47
Copy link
Member

@0xTim 0xTim left a comment

Choose a reason for hiding this comment

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

Ignore my comments about OpenSSL - I see we still need it. I'm assuming we have an issue open on Swift Crypto for this?

A few comments/suggestions - nothing blocking though

Sources/Passes/PassesDelegate.swift Show resolved Hide resolved
Sources/Passes/PassesError.swift Show resolved Hide resolved
Tests/OrdersTests/SecretMiddleware.swift Outdated Show resolved Hide resolved
Tests/PassesTests/PassesTests.swift Outdated Show resolved Hide resolved
Tests/PassesTests/SecretMiddleware.swift Outdated Show resolved Hide resolved
Sources/Passes/Models/PassModel.swift Show resolved Hide resolved
Sources/Passes/Passes.docc/GettingStarted.md Outdated Show resolved Hide resolved
Sources/Orders/OrdersServiceCustom.swift Outdated Show resolved Hide resolved
@fpseverino
Copy link
Member Author

I'm assuming we have an issue open on Swift Crypto for this?

Cory Benfield told me on Slack that encrypted PEM keys aren't supported because they use old encryption schemes (I assume DES) that they don't plan to support in Swift Crypto

@fpseverino fpseverino dismissed ptoffy’s stale review August 21, 2024 14:07

I made all the requested changes and received another approval

@fpseverino fpseverino merged commit 381051c into vapor-community:main Aug 21, 2024
9 of 10 checks passed
@fpseverino fpseverino deleted the update branch August 21, 2024 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants