From 62d40cad8f905ab014f2657a1d4a920aaad2b138 Mon Sep 17 00:00:00 2001 From: Robin Munn Date: Fri, 10 May 2024 10:31:05 +0700 Subject: [PATCH] Try to speed up project-reset E2E test It's taking 30-60 seconds for finishProjectReset to complete now, and I'm starting to suspect that we might not be clearing the NFS directory cache that actually needs clearing. So I'm doing an `ls` on the `.hg` folder to see if that makes a difference. --- hgweb/command-runner.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hgweb/command-runner.sh b/hgweb/command-runner.sh index e99342567..f94015b03 100644 --- a/hgweb/command-runner.sh +++ b/hgweb/command-runner.sh @@ -36,7 +36,7 @@ echo "" # Run the hg command, simply output to stdout first_char=$(echo $project_code | cut -c1) # Ensure NFS cache is refreshed in case project repo changed in another pod (e.g., project reset) -ls /var/hg/repos/$first_char/$project_code >/dev/null 2>/dev/null # Don't need output; this is enough to refresh NFS dir cache +ls /var/hg/repos/$first_char/$project_code/.hg >/dev/null 2>/dev/null # Don't need output; this is enough to refresh NFS dir cache # Sometimes invalidatedircache is called after deleting a project, so the cd would fail. So exit fast in that case. [ "x$command_name" = "xinvalidatedircache" ] && exit 0 cd /var/hg/repos/$first_char/$project_code