Merged
Conversation
axum as a dependency
RemiBardon
added a commit
that referenced
this pull request
Dec 18, 2024
`redocly lint` would raise an error and it would have been a problem when [migrating to Axum](#95) so it was a good time to do it. Breaking changes: - `GET /v1/invitations/{invitationIdOrToken}` was split in two: `GET /v1/invitations/{invitationId}` and `GET /v1/invitation-tokens/{token}/details` - `GET /v1/invitations/{invitationId}` don't need any query parameter (like before) - `GET /v1/invitation-tokens/{token}/details` expects `token_type=(accept|reject)` (like before) - `PUT /v1/invitations/{token}/accept` is now `/v1/invitation-tokens/{token}/accept` - `PUT /v1/invitations/{token}/reject` is now `/v1/invitation-tokens/{token}/reject`
RemiBardon
added a commit
that referenced
this pull request
Dec 19, 2024
`redocly lint` would raise an error and it would have been a problem when [migrating to Axum](#95) so it was a good time to do it. Breaking changes: - `GET /v1/invitations/{invitationIdOrToken}` was split in two: `GET /v1/invitations/{invitationId}` and `GET /v1/invitation-tokens/{token}/details` - `GET /v1/invitations/{invitationId}` don't need any query parameter (like before) - `GET /v1/invitation-tokens/{token}/details` expects `token_type=(accept|reject)` (like before) - `PUT /v1/invitations/{token}/accept` is now `/v1/invitation-tokens/{token}/accept` - `PUT /v1/invitations/{token}/reject` is now `/v1/invitation-tokens/{token}/reject`
This was referenced Jan 2, 2025
The API supports both the bracketed and non-bracketed syntax.
…xum `0.8` `serde_qs` is unmaintained and depending on the `axum` feature would prevent us from upgrading Axum.
…to prepare migration to Axum `0.8`
This was
linked to
issues
Jan 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I don't want to finish #71 using Rocket while we're supposed to migrate to Axum after that. Let's migrate now.
Compile time and size comparisons
After rewriting the API using Axum and fixing all smoke tests and integration tests, I executed a custom script which would build the API before and after the rewrite, in release mode, to compare the compile times and image sizes.
I executed the script on my machine with no other app running in the foreground, and made sure to purge all Docker caches to get a complete build.
The script
After 18 minutes, it yielded the following:
We can see that the build took 32% less time using Axum ($(606-410)/606=0.32$ ), and 22% less User CPU time ($(4.27-3.33)/4.27=0.22$ ), which is even better than I expected! System CPU time also went down by 13% ($(5.88-5.11)/5.88=0.13$ ).
The resulting binary is almost the same size, with a small 4% reduction ($(25.2-24.1)/25.2=0.04$ ). At least it didn't increase.
NOTE: I will fix release builds in a separate PR.(Already done in #96)