Skip to content

Commit b68c2a7

Browse files
fix ci. (#1557)
## Which issue does this PR close? Fix the ci failure in main branch. ## What changes are included in this PR? Use fixed version of `apache/iceberg-rest-fixture`. ## Are these changes tested? CI
1 parent d5e8348 commit b68c2a7

File tree

5 files changed

+37
-12
lines changed

5 files changed

+37
-12
lines changed

crates/catalog/rest/testdata/rest_catalog/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ networks:
2020

2121
services:
2222
rest:
23-
image: apache/iceberg-rest-fixture
23+
image: apache/iceberg-rest-fixture:1.9.2
2424
environment:
2525
- AWS_ACCESS_KEY_ID=admin
2626
- AWS_SECRET_ACCESS_KEY=password

crates/integration_tests/testdata/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ networks:
2020

2121
services:
2222
rest:
23-
image: apache/iceberg-rest-fixture
23+
image: apache/iceberg-rest-fixture:1.9.2
2424
environment:
2525
- AWS_ACCESS_KEY_ID=admin
2626
- AWS_SECRET_ACCESS_KEY=password

crates/integration_tests/testdata/spark/entrypoint.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ set -e
2222

2323
start-master.sh -p 7077
2424
start-worker.sh spark://spark-iceberg:7077
25-
start-history-server.sh
2625

26+
echo "Starting provision"
2727
python3 ./provision.py
2828

29+
echo "Finished provisioning"
2930
touch /tmp/ready
3031

31-
tail -f /dev/null
32+
echo "Print logs"
33+
tail -f $SPARK_HOME/logs/*

crates/test_utils/src/cmd.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,18 @@
1717

1818
use std::process::Command;
1919

20-
use tracing::info;
20+
use tracing::{error, info};
2121

22-
pub fn run_command(mut cmd: Command, desc: impl ToString) {
22+
pub fn run_command(mut cmd: Command, desc: impl ToString) -> bool {
2323
let desc = desc.to_string();
2424
info!("Starting to {}, command: {:?}", &desc, cmd);
2525
let exit = cmd.status().unwrap();
2626
if exit.success() {
27-
info!("{} succeed!", desc)
27+
info!("{} succeed!", desc);
28+
true
2829
} else {
29-
panic!("{} failed: {:?}", desc, exit);
30+
error!("{} failed: {:?}", desc, exit);
31+
false
3032
}
3133
}
3234

crates/test_utils/src/docker.rs

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,30 @@ impl DockerCompose {
8484
"1200000",
8585
]);
8686

87-
run_command(
87+
let ret = run_command(
8888
cmd,
8989
format!(
9090
"Starting docker compose in {}, project name: {}",
9191
self.docker_compose_dir, self.project_name
9292
),
93-
)
93+
);
94+
95+
if !ret {
96+
let mut cmd = Command::new("docker");
97+
cmd.current_dir(&self.docker_compose_dir);
98+
99+
cmd.env("DOCKER_DEFAULT_PLATFORM", Self::get_os_arch());
100+
101+
cmd.args(vec![
102+
"compose",
103+
"-p",
104+
self.project_name.as_str(),
105+
"logs",
106+
"spark-iceberg",
107+
]);
108+
run_command(cmd, "Docker compose logs");
109+
panic!("Docker compose up failed!")
110+
}
94111
}
95112

96113
pub fn down(&self) {
@@ -106,13 +123,17 @@ impl DockerCompose {
106123
"--remove-orphans",
107124
]);
108125

109-
run_command(
126+
let ret = run_command(
110127
cmd,
111128
format!(
112129
"Stopping docker compose in {}, project name: {}",
113130
self.docker_compose_dir, self.project_name
114131
),
115-
)
132+
);
133+
134+
if !ret {
135+
panic!("Failed to stop docker compose")
136+
}
116137
}
117138

118139
pub fn get_container_ip(&self, service_name: impl AsRef<str>) -> IpAddr {

0 commit comments

Comments
 (0)