From ea111a446185157c43e4d81afa1134568cbae47f Mon Sep 17 00:00:00 2001 From: Tulsi Shah Date: Mon, 6 May 2024 05:14:54 +0000 Subject: [PATCH 1/3] fix send logs on kokoro --- .../continuous_test/gcp_ubuntu/e2e_tests/e2e-tests-master.cfg | 2 +- .../continuous_test/gcp_ubuntu/e2e_tests/e2e-tests-release.cfg | 2 +- perfmetrics/scripts/presubmit_test/pr_perf_test/presubmit.cfg | 2 +- tools/integration_tests/operations/read_test.go | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/perfmetrics/scripts/continuous_test/gcp_ubuntu/e2e_tests/e2e-tests-master.cfg b/perfmetrics/scripts/continuous_test/gcp_ubuntu/e2e_tests/e2e-tests-master.cfg index 58b1e13a55..8fdd594018 100644 --- a/perfmetrics/scripts/continuous_test/gcp_ubuntu/e2e_tests/e2e-tests-master.cfg +++ b/perfmetrics/scripts/continuous_test/gcp_ubuntu/e2e_tests/e2e-tests-master.cfg @@ -14,7 +14,7 @@ action { define_artifacts { - regex: "gcsfuse-failed-integration-test-logs-*" + regex: "failed-integration-test-logs-*" strip_prefix: "github/gcsfuse/perfmetrics/scripts" } } diff --git a/perfmetrics/scripts/continuous_test/gcp_ubuntu/e2e_tests/e2e-tests-release.cfg b/perfmetrics/scripts/continuous_test/gcp_ubuntu/e2e_tests/e2e-tests-release.cfg index 58b1e13a55..8fdd594018 100644 --- a/perfmetrics/scripts/continuous_test/gcp_ubuntu/e2e_tests/e2e-tests-release.cfg +++ b/perfmetrics/scripts/continuous_test/gcp_ubuntu/e2e_tests/e2e-tests-release.cfg @@ -14,7 +14,7 @@ action { define_artifacts { - regex: "gcsfuse-failed-integration-test-logs-*" + regex: "failed-integration-test-logs-*" strip_prefix: "github/gcsfuse/perfmetrics/scripts" } } diff --git a/perfmetrics/scripts/presubmit_test/pr_perf_test/presubmit.cfg b/perfmetrics/scripts/presubmit_test/pr_perf_test/presubmit.cfg index 4b85905804..74db521945 100644 --- a/perfmetrics/scripts/presubmit_test/pr_perf_test/presubmit.cfg +++ b/perfmetrics/scripts/presubmit_test/pr_perf_test/presubmit.cfg @@ -13,7 +13,7 @@ # limitations under the License. action { define_artifacts { - regex: "gcsfuse-failed-integration-test-logs-*" + regex: "failed-integration-test-logs-*" strip_prefix: "github/gcsfuse/perfmetrics/scripts" } } diff --git a/tools/integration_tests/operations/read_test.go b/tools/integration_tests/operations/read_test.go index 59c98f3e0c..a07eb86b90 100644 --- a/tools/integration_tests/operations/read_test.go +++ b/tools/integration_tests/operations/read_test.go @@ -55,5 +55,7 @@ func TestReadAfterWrite(t *testing.T) { if got, want := string(content), "line 1\n"; got != want { t.Errorf("File content %q not match %q", got, want) } + + t.Fatalf("Test failure.") } } From 68c127a3ca4a91711d58765ab2d8b5dbeb5c561d Mon Sep 17 00:00:00 2001 From: Tulsi Shah Date: Mon, 6 May 2024 05:55:17 +0000 Subject: [PATCH 2/3] fix file name --- .../continuous_test/gcp_ubuntu/e2e_tests/e2e-tests-master.cfg | 2 +- .../continuous_test/gcp_ubuntu/e2e_tests/e2e-tests-release.cfg | 2 +- perfmetrics/scripts/presubmit_test/pr_perf_test/presubmit.cfg | 2 +- tools/integration_tests/operations/read_test.go | 2 -- tools/integration_tests/util/setup/setup.go | 2 +- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/perfmetrics/scripts/continuous_test/gcp_ubuntu/e2e_tests/e2e-tests-master.cfg b/perfmetrics/scripts/continuous_test/gcp_ubuntu/e2e_tests/e2e-tests-master.cfg index 8fdd594018..58b1e13a55 100644 --- a/perfmetrics/scripts/continuous_test/gcp_ubuntu/e2e_tests/e2e-tests-master.cfg +++ b/perfmetrics/scripts/continuous_test/gcp_ubuntu/e2e_tests/e2e-tests-master.cfg @@ -14,7 +14,7 @@ action { define_artifacts { - regex: "failed-integration-test-logs-*" + regex: "gcsfuse-failed-integration-test-logs-*" strip_prefix: "github/gcsfuse/perfmetrics/scripts" } } diff --git a/perfmetrics/scripts/continuous_test/gcp_ubuntu/e2e_tests/e2e-tests-release.cfg b/perfmetrics/scripts/continuous_test/gcp_ubuntu/e2e_tests/e2e-tests-release.cfg index 8fdd594018..58b1e13a55 100644 --- a/perfmetrics/scripts/continuous_test/gcp_ubuntu/e2e_tests/e2e-tests-release.cfg +++ b/perfmetrics/scripts/continuous_test/gcp_ubuntu/e2e_tests/e2e-tests-release.cfg @@ -14,7 +14,7 @@ action { define_artifacts { - regex: "failed-integration-test-logs-*" + regex: "gcsfuse-failed-integration-test-logs-*" strip_prefix: "github/gcsfuse/perfmetrics/scripts" } } diff --git a/perfmetrics/scripts/presubmit_test/pr_perf_test/presubmit.cfg b/perfmetrics/scripts/presubmit_test/pr_perf_test/presubmit.cfg index 74db521945..4b85905804 100644 --- a/perfmetrics/scripts/presubmit_test/pr_perf_test/presubmit.cfg +++ b/perfmetrics/scripts/presubmit_test/pr_perf_test/presubmit.cfg @@ -13,7 +13,7 @@ # limitations under the License. action { define_artifacts { - regex: "failed-integration-test-logs-*" + regex: "gcsfuse-failed-integration-test-logs-*" strip_prefix: "github/gcsfuse/perfmetrics/scripts" } } diff --git a/tools/integration_tests/operations/read_test.go b/tools/integration_tests/operations/read_test.go index a07eb86b90..59c98f3e0c 100644 --- a/tools/integration_tests/operations/read_test.go +++ b/tools/integration_tests/operations/read_test.go @@ -55,7 +55,5 @@ func TestReadAfterWrite(t *testing.T) { if got, want := string(content), "line 1\n"; got != want { t.Errorf("File content %q not match %q", got, want) } - - t.Fatalf("Test failure.") } } diff --git a/tools/integration_tests/util/setup/setup.go b/tools/integration_tests/util/setup/setup.go index b912aba2c3..5a2dfb1f68 100644 --- a/tools/integration_tests/util/setup/setup.go +++ b/tools/integration_tests/util/setup/setup.go @@ -221,7 +221,7 @@ func UnMountBucket() { func SaveLogFileInCaseOfFailure(successCode int) { if successCode != 0 { // Logfile name will be failed-integration-test-log-xxxxx - failedlogsFileName := "failed-integration-test-logs-" + GenerateRandomString(5) + failedlogsFileName := "gcsfuse-failed-integration-test-logs-" + GenerateRandomString(5) log.Printf("log file is available on kokoro artifacts with file name: %s", failedlogsFileName) logFileInKokoroArtifact := path.Join(os.Getenv("KOKORO_ARTIFACTS_DIR"), failedlogsFileName) err := operations.CopyFile(logFile, logFileInKokoroArtifact) From ba1d9707b14caca48dcae63420b025a3b8959749 Mon Sep 17 00:00:00 2001 From: Tulsi Shah Date: Mon, 6 May 2024 05:59:09 +0000 Subject: [PATCH 3/3] updating comment --- tools/integration_tests/util/setup/setup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/integration_tests/util/setup/setup.go b/tools/integration_tests/util/setup/setup.go index 5a2dfb1f68..b8dd34ae5f 100644 --- a/tools/integration_tests/util/setup/setup.go +++ b/tools/integration_tests/util/setup/setup.go @@ -220,7 +220,7 @@ func UnMountBucket() { func SaveLogFileInCaseOfFailure(successCode int) { if successCode != 0 { - // Logfile name will be failed-integration-test-log-xxxxx + // Logfile name will be gcsfuse-failed-integration-test-log-xxxxx failedlogsFileName := "gcsfuse-failed-integration-test-logs-" + GenerateRandomString(5) log.Printf("log file is available on kokoro artifacts with file name: %s", failedlogsFileName) logFileInKokoroArtifact := path.Join(os.Getenv("KOKORO_ARTIFACTS_DIR"), failedlogsFileName)