Skip to content

Commit 8be6bd2

Browse files
Merge pull request #3497 from CliMA/ck/repro_fixes2
Apply more reproducibility test infra fixes
2 parents 8cdd3f8 + a0af802 commit 8be6bd2

File tree

6 files changed

+215
-145
lines changed

6 files changed

+215
-145
lines changed

reproducibility_tests/move_output.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ move_data_to_save_dir(;
1717

1818
if buildkite_ci && in_merge_queue
1919
folders = get_reference_dirs_to_delete(; root_dir = cluster_data_prefix)
20-
debug_reproducibility() && @warn "Repro: deleting folders $folders"
20+
bins = compute_bins(folders)
21+
if !isempty(folders)
22+
msg = prod(x -> " $x\n", folders)
23+
@warn "Repro: deleting folders:\n$msg"
24+
end
25+
@warn "Deleted folder bins:\n $(string_bins(bins))"
2126
for f in folders
2227
rm(f; recursive = true, force = true)
2328
end

reproducibility_tests/ref_counter.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
192
1+
193
22

33
# **README**
44
#
@@ -21,6 +21,9 @@
2121

2222
#=
2323
24+
193
25+
- More reproducibility infrastructure fixes.
26+
2427
192
2528
- Reproducibility infrastructure fixes.
2629

reproducibility_tests/reproducibility_tools.jl

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,6 @@ function error_if_dissimilar_dicts(dicts, dict)
2727
end
2828
end
2929

30-
function all_files_in_dir(dir)
31-
all_files = String[]
32-
for (root, dirs, files) in walkdir(dir)
33-
for file in files
34-
push!(all_files, joinpath(root, file))
35-
end
36-
end
37-
return all_files
38-
end
39-
4030
function no_comparison_error(dirs, non_existent_files)
4131
msg = "\n\n"
4232
msg *= "Pull request author:\n"
@@ -59,7 +49,10 @@ function no_comparison_error(dirs, non_existent_files)
5949
msg *= "for how to merge this PR."
6050
msg *= "\n\n"
6151
for dir in dirs
62-
msg *= "Files in dirs: $(all_files_in_dir(dir))\n"
52+
msg *= "Files in dir $dir\n"
53+
for file in all_files_in_dir(dir)
54+
msg *= " $file\n"
55+
end
6356
end
6457
error(msg)
6558
end

0 commit comments

Comments
 (0)