From eb5b907ca475c3c470d7d9da3dcd78ffdffc9c96 Mon Sep 17 00:00:00 2001 From: Daniel Moody Date: Fri, 4 Nov 2022 15:50:50 +0000 Subject: [PATCH] SERVER-70712 improve scons splunk upload performance --- etc/evergreen_yml_components/definitions.yml | 15 +++++++-------- evergreen/scons_splunk.sh | 4 +++- site_scons/site_tools/validate_cache_dir.py | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/etc/evergreen_yml_components/definitions.yml b/etc/evergreen_yml_components/definitions.yml index 7d6b4999d30..b0c2470d09a 100644 --- a/etc/evergreen_yml_components/definitions.yml +++ b/etc/evergreen_yml_components/definitions.yml @@ -1240,6 +1240,13 @@ functions: - *get_version_expansions - *apply_version_expansions - *f_expansions_write + - command: subprocess.exec + params: + background: true + continue_on_err: true + binary: bash + args: + - "./src/evergreen/scons_splunk.sh" - command: subprocess.exec type: test params: @@ -2094,14 +2101,6 @@ functions: permissions: public-read display_name: SCons stdout log - - *f_expansions_write - - command: subprocess.exec - params: - continue_on_err: true - binary: bash - args: - - "./src/evergreen/scons_splunk.sh" - "send scons cedar report": - command: subprocess.exec params: diff --git a/evergreen/scons_splunk.sh b/evergreen/scons_splunk.sh index a8fdd9f937d..08b76ffe873 100644 --- a/evergreen/scons_splunk.sh +++ b/evergreen/scons_splunk.sh @@ -1,4 +1,6 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/prelude.sh" -curator --level warning splunk --json --url=${scons_splunk_server} --token=${scons_splunk_token} --annotation=project:${project} --annotation=task_id:${task_id} --annotation=build_variant:${build_variant} --annotation=git_revision:${revision} pipe < src/scons_cache.log.json +touch src/scons_cache.log.json +# TODO EVG-18207 remove GODEBUG=asyncpreemptoff=1 +GODEBUG=asyncpreemptoff=1 curator --level warning splunk --json --url=${scons_splunk_server} --token=${scons_splunk_token} --annotation=project:${project} --annotation=task_id:${task_id} --annotation=build_variant:${build_variant} --annotation=git_revision:${revision} follow --file src/scons_cache.log.json diff --git a/site_scons/site_tools/validate_cache_dir.py b/site_scons/site_tools/validate_cache_dir.py index 3bd07462ade..4c6531f306b 100644 --- a/site_scons/site_tools/validate_cache_dir.py +++ b/site_scons/site_tools/validate_cache_dir.py @@ -192,7 +192,7 @@ class CacheDirValidate(SCons.CacheDir.CacheDir): def CacheDebugJson(self, json_data, target, cachefile): if SCons.CacheDir.cache_debug and SCons.CacheDir.cache_debug != '-' and self.json_log is None: - self.json_log = open(SCons.CacheDir.cache_debug + '.json', 'w') + self.json_log = open(SCons.CacheDir.cache_debug + '.json', 'a') if self.json_log is not None: cksum_cachefile = str(pathlib.Path(cachefile).parent)