-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
refactor!: upgrade to axum 0.7 #62
Conversation
WalkthroughThe pull request introduces several modifications across multiple files, primarily focusing on updating GitHub Actions workflows to fetch the entire commit history and upgrading various dependencies in the Rust project. Significant changes include the transition to Changes
Assessment against linked issues
Poem
Recent review detailsConfiguration used: CodeRabbit UI Files ignored due to path filters (1)
Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
activitypub-federation
forkThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (2)
crates/openapi/src/lib.rs (1)
9-13
: The updated routing logic looks good! Consider removing the commented-out code.The changes to the
routes
function improve the clarity of the routing setup by explicitly defining the route for the OpenAPI JSON documentation. The use ofget
andJson
fromaxum
is appropriate for this purpose.Since the Swagger UI integration is commented out, it seems like it's not planned for implementation in the near future. Consider removing the commented-out code to keep the codebase clean and maintain focus on the active features. If the Swagger UI integration is still desired, consider creating a separate issue or task to track its implementation.
Justfile (1)
61-63
: LGTM! Consider adding a comment to document the command.The new
up
command is a helpful addition to update dependencies usingcargo update
. The implementation looks good.To improve the maintainability of the
Justfile
, consider adding a comment above the command to document its purpose. For example:+# update dependencies up: cargo update
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
Cargo.lock
is excluded by!**/*.lock
Files selected for processing (11)
- .github/workflows/check.yml (1 hunks)
- .github/workflows/gh-pages.yml (1 hunks)
- .github/workflows/release.yml (1 hunks)
- Cargo.toml (3 hunks)
- Justfile (1 hunks)
- crates/api_admin/src/routes/mod.rs (2 hunks)
- crates/backend/src/lib.rs (2 hunks)
- crates/openapi/Cargo.toml (1 hunks)
- crates/openapi/src/lib.rs (1 hunks)
- crates/tracing/Cargo.toml (1 hunks)
- flake.nix (1 hunks)
Additional comments not posted (17)
crates/openapi/src/lib.rs (1)
1-2
: LGTM!The updated import statement correctly includes the necessary functionality from
axum
to support the changes in theroutes
function. The imports are properly specified and there are no unused imports.crates/tracing/Cargo.toml (1)
33-33
: LGTM!Updating the optional
console-subscriber
dependency to version0.4
is a reasonable change that may introduce improvements or bug fixes. Since the dependency is not enabled by default, it is unlikely to break existing functionality.crates/openapi/Cargo.toml (1)
29-29
: LGTM! The change to use a workspace dependency forutoipa-swagger-ui
is a good approach.Using a workspace dependency for
utoipa-swagger-ui
offers several benefits:
Consistency: It ensures that all workspace members use the same version of the dependency, reducing the risk of version conflicts and incompatibilities.
Simplified management: By declaring the dependency once at the workspace level, it becomes easier to manage and update across multiple crates within the workspace.
Faster builds: Cargo can optimize builds by sharing the same dependency across multiple crates, reducing redundant compilations.
This change aligns well with the broader goal of streamlining dependency management and promoting better integration within the workspace.
.github/workflows/gh-pages.yml (1)
26-28
: LGTM!The upgrade to
actions/checkout@v4
and the addition offetch-depth: 0
are great improvements that align with the best practices for GitHub Actions workflows. These changes ensure that the workflow has access to the latest features and the complete commit history, enhancing its functionality and reliability..github/workflows/check.yml (1)
25-26
: LGTM!The addition of
fetch-depth: 0
to theactions/checkout@v4
step is a necessary change to ensure that the entire commit history is fetched. This is important for subsequent steps likenix flake check
that require the full context of the repository.The AI-generated summary accurately captures the purpose and impact of this change.
crates/api_admin/src/routes/mod.rs (1)
Line range hint
25-39
: LGTM!The changes to the
auth
middleware function are necessary to ensure compatibility with Axum 0.7. The updates to theRequest
andNext
types align with the new Axum API and should not affect the functionality of the middleware.The change from
Request<B>
toRequest<Body>
provides a more specific type for the request body, while the simplification ofNext<B>
toNext
suggests that the middleware system in Axum 0.7 now handles the request body internally.Overall, the modifications are appropriate and maintain the existing logic of the
auth
middleware.crates/backend/src/lib.rs (2)
41-46
: LGTM!The change simplifies the server setup by directly creating a TCP listener with the specified host and port from the environment configuration. This aligns with the PR objective of upgrading to Axum 0.7 and hyper/http 1.0.
47-48
: LGTM!Starting the server using
axum::serve
with the TCP listener is a more streamlined method compared to the earlier commented-out approach. The change enhances the clarity and efficiency of the server initialization process..github/workflows/release.yml (1)
41-42
: LGTM!The addition of
fetch-depth: 0
to theactions/checkout@v4
step ensures that the entire repository history is fetched during the checkout process. This can be beneficial for workflows that require access to the full commit history, such as generating changelogs or performing operations that depend on previous commits.The change is straightforward and does not introduce any issues or errors in the workflow configuration.
Cargo.toml (7)
86-88
: Verify the need for updating to an alpha release.The
activitypub_federation
dependency has been updated to version0.6.0-alpha
, which is an alpha release. While this update may introduce new features or improvements, alpha releases are not considered stable and may contain bugs or breaking changes.Please ensure that you have thoroughly tested the application with this new version to identify any potential issues or breaking changes. If the new features are not critical, consider waiting for a more stable release.
90-93
: Test the application with the updated release candidate.The
apalis
dependency has been updated to version0.6.0-rc
, which is a release candidate. While release candidates are generally more stable than alpha releases, it's still important to thoroughly test the application to ensure compatibility and identify any potential issues.Please make sure you have tested the application with this new version and confirmed that everything works as expected.
94-94
: Ensure compatibility with the updated release candidate.The
apalis-cron
dependency has been updated to version0.6.0-rc
, which is consistent with theapalis
dependency update. As mentioned earlier, please make sure you have thoroughly tested the application to ensure compatibility and identify any potential issues with this new release candidate version.
97-97
: Review the changelog, update the code, and test thoroughly.The
axum
dependency has been updated from version0.6
to0.7
, which is a significant minor version bump. This update may introduce new features, improvements, and possibly breaking changes.Please make sure you have:
- Reviewed the changelog and migration guide to understand the changes introduced in this new version.
- Updated the code to handle any breaking changes and to leverage new features, if applicable.
- Thoroughly tested the application to ensure compatibility and identify any potential issues.
106-109
: Review the changelog, update the code, and test thoroughly.The
reqwest
dependency has been updated from version0.11
to0.12
, which is a minor version bump. This update may introduce new features, improvements, and possibly breaking changes.Please ensure that you have:
- Reviewed the changelog and migration guide to understand the changes introduced in this new version.
- Updated the code to handle any breaking changes and to leverage new features, if applicable.
- Thoroughly tested the application to ensure compatibility and identify any potential issues.
110-110
: Review the changelog, update the code, and test thoroughly.The
scraper
dependency has been updated from version0.19
to0.20
, which is a minor version bump. This update may introduce new features, improvements, and possibly breaking changes.Please ensure that you have:
- Reviewed the changelog and migration guide to understand the changes introduced in this new version.
- Updated the code to handle any breaking changes and to leverage new features, if applicable.
- Thoroughly tested the application to ensure compatibility and identify any potential issues.
123-123
: Review the changelog, update the code, and test thoroughly.The
tower-http
dependency has been updated from version0.4
to0.5
, which is a minor version bump. This update may introduce new features, improvements, and possibly breaking changes.Please ensure that you have:
- Reviewed the changelog and migration guide to understand the changes introduced in this new version.
- Updated the code to handle any breaking changes and to leverage new features, if applicable.
- Thoroughly tested the application to ensure compatibility and identify any potential issues.
flake.nix (1)
38-40
: LGTM!The modification to the
filter
function enhances the source filtering logic by including paths related to the activitypub-federation documentation. This change is consistent with the project's objectives and does not introduce any issues.
closed #50
Summary by CodeRabbit
New Features
rust-analyzer
in the development environment.Updates
Chores