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

Bump ureq to 3.0.0 #35

Merged
merged 10 commits into from
Feb 17, 2025
Merged

Bump ureq to 3.0.0 #35

merged 10 commits into from
Feb 17, 2025

Conversation

sosthene-nitrokey
Copy link
Contributor

This would be a breaking change. Benefits: some of the feature we needed to improve the reliability of the pkcs11 module were only available in our fork. This would allow us to use the upstream version.

@robin-nitrokey
Copy link
Member

robin-nitrokey commented Oct 29, 2024

And it would also make the TLS configuration for the tests much easier, so I’m in favor of updating.

@sosthene-nitrokey
Copy link
Contributor Author

No it would not, on the opposite it would make it more complex. This currently fails because when disabling TLS it says to the server that it does not support any Signature scheme which leads to an error :(

And in the pkcs11 module we would still need some custom TLS config. But at least now it will not depend on a semver hazard.

Copy link
Member

@robin-nitrokey robin-nitrokey left a comment

Choose a reason for hiding this comment

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

AFAIS the custom Verifier in the tests can now be removed (and maybe even the rustls dependency?). And do we still need to pin the ureq dev dependency to a specific version?

@sosthene-nitrokey sosthene-nitrokey changed the title Bump ureq to 3.0.0-rc2 Bump ureq to 3.0.0 Feb 13, 2025
@sosthene-nitrokey sosthene-nitrokey marked this pull request as ready for review February 13, 2025 10:05
Copy link
Member

@robin-nitrokey robin-nitrokey left a comment

Choose a reason for hiding this comment

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

Please add a changelog entry before merging.

@robin-nitrokey
Copy link
Member

I wonder if it would make sense to implement the operations in terms of the http crate instead of using ureq directly. This would allow us to make ureq optional and ureq updates would no longer be breaking changes. We could of course still provide a default implementation using ureq.

http is also supported by hyper and reqwest so we would cover all major Rust HTTP clients.

We could either let the user provide something like a Fn(http::Request) -> Result<http::Response, Box<dyn Error>> as part of the Configuration. Or provide structs that can be converted to and from the http types to implement the operations – that would even be compatible with async HTTP clients.

@sosthene-nitrokey
Copy link
Contributor Author

That could sound good (or we could also use an async-trait and a normal trait for the sync client and have implementations for both).

I'm not sure it's worth implementing without downstream requests for it.

@sosthene-nitrokey sosthene-nitrokey merged commit fad0a67 into main Feb 17, 2025
6 checks passed
@robin-nitrokey robin-nitrokey deleted the ureq-v3.0 branch February 17, 2025 15:12
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