build(deps): bump reqwest from `v0.11.18` to `v0.12.2`
Type of Change
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [x] Dependency updates
- [ ] Documentation
- [ ] CI/CD
Description
This PR updates reqwest dependency version from 0.11.18 to 0.12.2 to address frequent disconnections and connection reset errors.
The major here is that we use actix_web along with reqwest. With reqwest releasing 0.12.0, http crate version was bumped from 0.x to 1.x while on actix_web v4.5.1 it is still on version v0.2.9. This version mismatch is what is handled here in this PR.
Also, in webhook.rs, it is not possible to directly convert headers that we get from reqwest to match with actix_web unless actix_web updates http version to 1.x. Also, since reqwest does not support HttpRequest explicitly, we cannot directly use that either which led to manual conversion. (Open for discussions on this)
reqwest changelog can be found here and notable breaking changes can be found here
Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
Motivation and Context
Dependency update has been done in order to address frequent connection_reset errors.
Closes #4248
How did you test it?
Basic tests
- Create { Merchant + API Key + MCA }
- Update API Key
- Make Payment
- Refund
Postman tests
Once they succeeded, ran the postman collection for confirmation
Webhooks
Clickhouse
Set up clickhouse by following the guide here http:localhost:8090
Checklist
- [x] I formatted the code
cargo +nightly fmt --all - [x] I addressed lints thrown by
cargo clippy - [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a CHANGELOG entry if applicable
After today's discussions, it has been decided to better wait before getting this PR merged as actix_web has an open PR that updates http crate version to 1.x from 0.2.9 (which might take some time).
Once that is done, it will be easier for us to update the dependencies all together (actix_web, http and, reqwest) to their latest versions.
With that said, I'll be closing this PR to avoid any conflicts or confusion. I'll be raising yet another PR on behalf of this (just to keep the history clean) addressing the above mentioned changes.
I do not think this will ever be looked upon since:
- we are moving away from using
reqwestin many places - refactor that is being done