Skip to content

Commit 286d04a

Browse files
authored
Merge pull request #159 from joesturge/157-failed-to-proxyapplication-unhealthy
fix: app no longer going unhealthy when any lazymc error occurs, and …
2 parents 80ad876 + 6da940d commit 286d04a

File tree

9 files changed

+581
-286
lines changed

9 files changed

+581
-286
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Container going unhealthy when any error occurs in lazymc, it probably should not be doing that
13+
- Fixed test/bot by limiting rust nightly to 2024-10-01
14+
1015
## [2.7.0] - 2024-11-08
1116

1217
### Build

src/entrypoint/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,6 @@ fn handle_log(group: &String, level: &Level, message: &String) {
9999
docker::stop(group.clone());
100100
info!(target: "lazymc-docker-proxy::entrypoint", "{} server container forcefully stopped", group.clone());
101101
}
102-
(Level::Error, _) => {
103-
health::unhealthy();
104-
}
105102
_ => {}
106103
}
107104
}

tests/bats/static-network/docker-compose.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ services:
4141
environment:
4242
EULA: "TRUE"
4343
ONLINE_MODE: "FALSE"
44+
VERSION: "1.21.1"
4445
volumes:
4546
- data:/data
4647

tests/bats/static-network/static-network.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ project="./tests/bats/static-network"
2828
wait_for_log "lazymc-static-network" "address = \"172.21.0.3:25565\""
2929

3030
# wait for lazymc-docker-proxy to to be ready
31-
wait_for_formatted_log "lazymc-static-network" "INFO" "lazymc-docker-proxy::health" "Application is healthy."
31+
wait_for_formatted_log "lazymc-static-network" "INFO" "lazymc-docker-proxy::health" "Application is healthy." 300
3232

3333
# start the client container
3434
start_container mc-client-static-network
3535

3636
# wait for lazymc to start the server for the client
37-
wait_for_formatted_log "lazymc-static-network" "INFO" "mc::lazymc" "Starting server for 'test-bot'..."
37+
wait_for_formatted_log "lazymc-static-network" "INFO" "mc::lazymc" "Starting server for 'test-bot'..." 300
3838

3939
# wait for the server to be online
4040
wait_for_formatted_log "lazymc-static-network" "INFO" "mc::lazymc::monitor" "Server is now online" 300

tests/bats/unexpected-server-state-recovery/docker-compose.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ services:
3939
environment:
4040
EULA: "TRUE"
4141
ONLINE_MODE: "FALSE"
42+
VERSION: "1.21.1"
4243
volumes:
4344
- data:/data
4445

tests/bats/unexpected-server-state-recovery/unexpected-server-state-recovery.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ project="./tests/bats/unexpected-server-state-recovery"
2222
#
2323

2424
# wait for lazymc-docker-proxy to to be ready
25-
wait_for_formatted_log "lazymc-unexpected-server-state-recovery" "INFO" "lazymc-docker-proxy::health" "Application is healthy."
25+
wait_for_formatted_log "lazymc-unexpected-server-state-recovery" "INFO" "lazymc-docker-proxy::health" "Application is healthy." 300
2626

2727
# wait for lazymc to be ready
2828
wait_for_formatted_log "lazymc-unexpected-server-state-recovery" "INFO" "mc::lazymc" "Proxying public 0.0.0.0:25565 to server 172.21.0.3:25565"
@@ -39,7 +39,7 @@ project="./tests/bats/unexpected-server-state-recovery"
3939
start_container mc-client-unexpected-server-state-recovery
4040

4141
# wait for test-bot to connect
42-
wait_for_log "mc-unexpected-server-state-recovery" "test-bot joined the game"
42+
wait_for_log "mc-unexpected-server-state-recovery" "test-bot joined the game" 300
4343

4444
# stop the client container
4545
stop_container mc-client-unexpected-server-state-recovery

0 commit comments

Comments
 (0)