vapor / fluent

Vapor ORM (queries, models, and relations) for NoSQL and SQL databases
https://docs.vapor.codes/4.0/fluent/overview/
MIT License
1.32k stars 172 forks source link

Asyncification of Fluent provider #772

Closed gwynne closed 9 months ago

gwynne commented 9 months ago

These changes are now available in 4.9.0

Updates the Fluent provider package to be (mostly) Sendable-correct and switches MigrateCommand to being async to avoid dangerous misuse of EventLoopFuture.wait().

Bumps minimum Swift version to 5.7 (matching Vapor).

codecov-commenter commented 9 months ago

Codecov Report

Attention: 21 lines in your changes are missing coverage. Please review.

Comparison is base (8665428) 60.10% compared to head (a075e7f) 60.10%. Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #772 +/- ## ======================================= Coverage 60.10% 60.10% ======================================= Files 15 15 Lines 386 386 ======================================= Hits 232 232 Misses 154 154 ``` | [Files](https://app.codecov.io/gh/vapor/fluent/pull/772?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor) | Coverage Δ | | |---|---|---| | [.../ModelCredentialsAuthenticatable+Concurrency.swift](https://app.codecov.io/gh/vapor/fluent/pull/772?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnQvQ29uY3VycmVuY3kvTW9kZWxDcmVkZW50aWFsc0F1dGhlbnRpY2F0YWJsZStDb25jdXJyZW5jeS5zd2lmdA==) | `85.71% <100.00%> (ø)` | | | [Sources/Fluent/Fluent+History.swift](https://app.codecov.io/gh/vapor/fluent/pull/772?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnQvRmx1ZW50K0hpc3Rvcnkuc3dpZnQ=) | `88.88% <ø> (ø)` | | | [Sources/Fluent/Fluent+Pagination.swift](https://app.codecov.io/gh/vapor/fluent/pull/772?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnQvRmx1ZW50K1BhZ2luYXRpb24uc3dpZnQ=) | `100.00% <ø> (ø)` | | | [...urces/Fluent/ModelCredentialsAuthenticatable.swift](https://app.codecov.io/gh/vapor/fluent/pull/772?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnQvTW9kZWxDcmVkZW50aWFsc0F1dGhlbnRpY2F0YWJsZS5zd2lmdA==) | `75.00% <100.00%> (ø)` | | | [Sources/Fluent/PageLimit.swift](https://app.codecov.io/gh/vapor/fluent/pull/772?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnQvUGFnZUxpbWl0LnN3aWZ0) | `66.66% <ø> (ø)` | | | [...rces/Fluent/Concurrency/Sessions+Concurrency.swift](https://app.codecov.io/gh/vapor/fluent/pull/772?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnQvQ29uY3VycmVuY3kvU2Vzc2lvbnMrQ29uY3VycmVuY3kuc3dpZnQ=) | `0.00% <0.00%> (ø)` | | | [Sources/Fluent/ModelAuthenticatable.swift](https://app.codecov.io/gh/vapor/fluent/pull/772?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnQvTW9kZWxBdXRoZW50aWNhdGFibGUuc3dpZnQ=) | `0.00% <0.00%> (ø)` | | | [Sources/Fluent/ModelTokenAuthenticatable.swift](https://app.codecov.io/gh/vapor/fluent/pull/772?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnQvTW9kZWxUb2tlbkF1dGhlbnRpY2F0YWJsZS5zd2lmdA==) | `0.00% <0.00%> (ø)` | | | [Sources/Fluent/Fluent+Sessions.swift](https://app.codecov.io/gh/vapor/fluent/pull/772?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnQvRmx1ZW50K1Nlc3Npb25zLnN3aWZ0) | `77.41% <60.00%> (ø)` | | | [Sources/Fluent/FluentProvider.swift](https://app.codecov.io/gh/vapor/fluent/pull/772?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnQvRmx1ZW50UHJvdmlkZXIuc3dpZnQ=) | `79.31% <81.81%> (ø)` | | | ... and [2 more](https://app.codecov.io/gh/vapor/fluent/pull/772?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor) | |
github-advanced-security[bot] commented 9 months ago

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.