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

fix: mitigate hyper error: IncompleteMessage: connection closed before message completed #285

Merged
merged 16 commits into from
Jul 26, 2024

Conversation

Manuthor
Copy link
Contributor

Since Validate KMIP operation requires to fetch CRLs (potentially on external websites), there is a racy problem in KMS CLI tests.
There is a hyper known issue where hyper selects a dead connection from its pool: hyperium/hyper#2136.

The bug is hard to reproduce and happens randomly and almost exclusively in Github CI (network bandwith limitation?).
The KMS Rest Client retry once in case of error after a small arbitrary delay (required for pool connection availability).

@Manuthor Manuthor force-pushed the more_certs_validate_hyper branch 2 times, most recently from d945902 to ab79673 Compare July 25, 2024 18:49
@Manuthor Manuthor merged commit 73b320f into more_certs_validate Jul 26, 2024
23 of 35 checks passed
@Manuthor Manuthor deleted the more_certs_validate_hyper branch July 26, 2024 14:39
Manuthor added a commit that referenced this pull request Aug 10, 2024
…e message completed (#285)

* fix: try fix hyper problem

* chore: log kms rest client error

* chore: log kms rest client error

* fix: re-add small delay after a hyper incompletemessage error

* fix: revert test cli changes

* fix: revert test_server change

* fix: small fix in certificate indexing

* fix: try new timeout on reqwest

* fix: control RUST_LOG from variable env.

* chore: force sleep before retry

* fix: use default features of reqwest

* fix: sync reqwest features between client and server

* chore: bump reqwest to 0.12

* fix: set default timeout on server. Remove delay in fetching CRL

* fix: try to block async thread on client request

* fix: keep retry on failure on KMS rest client
Manuthor added a commit that referenced this pull request Aug 13, 2024
* fix: pedantic clippy lints

* fix: validate certificate generation

* fix: try disable hyper idle pool

* fix: add retry on KMS rest client

* fix: mitigate hyper error: IncompleteMessage: connection closed before message completed (#285)

* fix: try fix hyper problem

* chore: log kms rest client error

* chore: log kms rest client error

* fix: re-add small delay after a hyper incompletemessage error

* fix: revert test cli changes

* fix: revert test_server change

* fix: small fix in certificate indexing

* fix: try new timeout on reqwest

* fix: control RUST_LOG from variable env.

* chore: force sleep before retry

* fix: use default features of reqwest

* fix: sync reqwest features between client and server

* chore: bump reqwest to 0.12

* fix: set default timeout on server. Remove delay in fetching CRL

* fix: try to block async thread on client request

* fix: keep retry on failure on KMS rest client

* ci: fix tests on certificate validation

* chore: revert CI change, remove filter on tests certify

* test: connection pool

* chore: use std::RwLock instead of tokio::RwLock

* chore: bump sqlx version

* chore: remove http crate and reuse actix-web:http crate

* chore: ignore temporarly 2 tests on server

* test: set max idle connection on validate operation

* test: remove RwLock on client

* test: use rustls-tls for server

* chore: downgrade hyper-util to 0.1.5

* test: disabling cert auth in test_server

* fix: remove logs in test - not required for now

* chore: revert downgrade of hyper-util + remove useless join_all

* docs: add doc validation

* fix: cargo format

* ci: re-enable logs in tests

* chore: reduce deps in Cargo.lock

* chore: small clippy fixes

* docs: add doc validation

* fix: simplify pieces of code

* fix: avoid clones

* fix: more clippy fixes

* chore: rename certificates sorting function
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.

1 participant