Skip to content

Commit e29cd0d

Browse files
authored
fix: handle claude suggestions (#460)
1 parent 0121811 commit e29cd0d

File tree

5 files changed

+51
-49
lines changed

5 files changed

+51
-49
lines changed

core-client/tests-utils/src/lib.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@ impl DockerComposeCmd {
103103
| KMSMode::ThresholdCustodianTestParameter => {
104104
&[50100, 50200, 50300, 50400, 50001, 50002, 50003, 50004]
105105
}
106-
KMSMode::Centralized | KMSMode::CentralizedCustodian => &[50100],
106+
KMSMode::Centralized | KMSMode::CentralizedCustodian => &[50051],
107107
}
108108
}
109109

110110
pub fn up(&self) {
111111
self.down(); // Make sure that no container is running
112112
// Wait for the OS to release ports before starting new containers.
113113
// Without this, Docker Compose retries fail with "address already in use".
114-
wait_for_ports_free(Self::ports_for_mode(self.mode), Duration::from_secs(30));
114+
wait_for_ports_free(Self::ports_for_mode(self.mode), Duration::from_secs(120));
115115
let build_docker = env::var("DOCKER_BUILD_TEST_CORE_CLIENT").unwrap_or("".to_string());
116116

117117
// set the FHE params based on mode
@@ -172,7 +172,7 @@ impl DockerComposeCmd {
172172
build.arg("--build");
173173
}
174174

175-
build.arg("--wait");
175+
build.arg("--wait").arg("--wait-timeout").arg("120");
176176
println!("{build:?}");
177177

178178
match build.spawn() {
@@ -257,7 +257,9 @@ impl DockerComposeCmd {
257257
docker_down
258258
.arg("down")
259259
.arg("--volumes")
260-
.arg("--remove-orphans");
260+
.arg("--remove-orphans")
261+
.arg("--timeout")
262+
.arg("30");
261263

262264
let docker_down_output = docker_down
263265
.output()

core/service/src/bin/kms-server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ async fn main_exec() -> anyhow::Result<()> {
513513
};
514514
migrate_to_0_13_10(&mut private_storage, kms_type)
515515
.await
516-
.expect("Could not complete migration: {e}");
516+
.inspect_err(|e| tracing::error!("Could not complete migration: {e}"))?;
517517

518518
let attest_private_vault_root_key_policy = core_config
519519
.threshold

docker-compose-core-centralized.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ services:
2525
- "9646:9646"
2626
healthcheck:
2727
test: "grpc_health_probe --addr=localhost:50051"
28-
interval: 1s
29-
timeout: 1s
30-
retries: 5
31-
start_period: 1s
28+
interval: 2s
29+
timeout: 2s
30+
retries: 15
31+
start_period: 10s
3232
volumes:
3333
- minio_secrets:/minio_secrets
3434
- ./core/service/config/:/app/kms/core/service/config

docker-compose-core-threshold-6.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ services:
6969
- "9646:9646"
7070
healthcheck:
7171
test: "grpc_health_probe --addr=localhost:50100"
72-
interval: 1s
73-
timeout: 1s
74-
retries: 5
75-
start_period: 1s
72+
interval: 2s
73+
timeout: 2s
74+
retries: 15
75+
start_period: 10s
7676
volumes:
7777
- ./core/service/config/:/app/kms/core/service/config
7878
- keys:/app/kms/core/service/keys
@@ -115,10 +115,10 @@ services:
115115
- "50200:50200"
116116
healthcheck:
117117
test: "grpc_health_probe --addr=localhost:50200"
118-
interval: 1s
119-
timeout: 1s
120-
retries: 5
121-
start_period: 1s
118+
interval: 2s
119+
timeout: 2s
120+
retries: 15
121+
start_period: 10s
122122
volumes:
123123
- ./core/service/config/:/app/kms/core/service/config
124124
- keys:/app/kms/core/service/keys
@@ -158,10 +158,10 @@ services:
158158
- "50300:50300"
159159
healthcheck:
160160
test: "grpc_health_probe --addr=localhost:50300"
161-
interval: 1s
162-
timeout: 1s
163-
retries: 5
164-
start_period: 1s
161+
interval: 2s
162+
timeout: 2s
163+
retries: 15
164+
start_period: 10s
165165
volumes:
166166
- ./core/service/config/:/app/kms/core/service/config
167167
- keys:/app/kms/core/service/keys
@@ -201,10 +201,10 @@ services:
201201
- "50400:50400"
202202
healthcheck:
203203
test: "grpc_health_probe --addr=localhost:50400"
204-
interval: 1s
205-
timeout: 1s
206-
retries: 5
207-
start_period: 1s
204+
interval: 2s
205+
timeout: 2s
206+
retries: 15
207+
start_period: 10s
208208
volumes:
209209
- ./core/service/config/:/app/kms/core/service/config
210210
- keys:/app/kms/core/service/keys
@@ -244,10 +244,10 @@ services:
244244
- "50500:50500"
245245
healthcheck:
246246
test: "grpc_health_probe --addr=localhost:50500"
247-
interval: 1s
248-
timeout: 1s
249-
retries: 5
250-
start_period: 1s
247+
interval: 2s
248+
timeout: 2s
249+
retries: 15
250+
start_period: 10s
251251
volumes:
252252
- ./core/service/config/:/app/kms/core/service/config
253253
- keys:/app/kms/core/service/keys
@@ -287,10 +287,10 @@ services:
287287
- "50600:50600"
288288
healthcheck:
289289
test: "grpc_health_probe --addr=localhost:50600"
290-
interval: 1s
291-
timeout: 1s
292-
retries: 5
293-
start_period: 1s
290+
interval: 2s
291+
timeout: 2s
292+
retries: 15
293+
start_period: 10s
294294
volumes:
295295
- ./core/service/config/:/app/kms/core/service/config
296296
- keys:/app/kms/core/service/keys

docker-compose-core-threshold.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ services:
6767
- "9646:9646"
6868
healthcheck:
6969
test: "grpc_health_probe --addr=localhost:50100"
70-
interval: 1s
71-
timeout: 1s
72-
retries: 5
73-
start_period: 1s
70+
interval: 2s
71+
timeout: 2s
72+
retries: 15
73+
start_period: 10s
7474
volumes:
7575
- ./core/service/config/:/app/kms/core/service/config
7676
- keys:/app/kms/core/service/keys
@@ -111,10 +111,10 @@ services:
111111
- "9647:9646"
112112
healthcheck:
113113
test: "grpc_health_probe --addr=localhost:50200"
114-
interval: 1s
115-
timeout: 1s
116-
retries: 5
117-
start_period: 1s
114+
interval: 2s
115+
timeout: 2s
116+
retries: 15
117+
start_period: 10s
118118
volumes:
119119
- ./core/service/config/:/app/kms/core/service/config
120120
- keys:/app/kms/core/service/keys
@@ -155,10 +155,10 @@ services:
155155
- "9648:9646"
156156
healthcheck:
157157
test: "grpc_health_probe --addr=localhost:50300"
158-
interval: 1s
159-
timeout: 1s
160-
retries: 5
161-
start_period: 1s
158+
interval: 2s
159+
timeout: 2s
160+
retries: 15
161+
start_period: 10s
162162
volumes:
163163
- ./core/service/config/:/app/kms/core/service/config
164164
- keys:/app/kms/core/service/keys
@@ -199,10 +199,10 @@ services:
199199
- "9649:9646"
200200
healthcheck:
201201
test: "grpc_health_probe --addr=localhost:50400"
202-
interval: 1s
203-
timeout: 1s
204-
retries: 5
205-
start_period: 1s
202+
interval: 2s
203+
timeout: 2s
204+
retries: 15
205+
start_period: 10s
206206
volumes:
207207
- ./core/service/config/:/app/kms/core/service/config
208208
- keys:/app/kms/core/service/keys

0 commit comments

Comments
 (0)