[infra] Remove Upload tasks for Test.*Canvaskit jobs.

Bug: skia:11785
Change-Id: I0f176c1ab3c5679c74efb727d55bf5431d5dae47
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/387636
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This commit is contained in:
Weston Tracey 2021-03-25 10:45:56 -04:00
parent c28336e5c2
commit 593c99ef5e
6 changed files with 164 additions and 143 deletions

View File

@ -467,9 +467,11 @@ benchmark Skia using skpbench.
Run the DM test.
### *recipes* / [test\_canvaskit](/infra/bots/recipes/test_canvaskit.py)
[DEPS](/infra/bots/recipes/test_canvaskit.py#7): [recipe\_engine/file][recipe_engine/recipe_modules/file], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/step][recipe_engine/recipe_modules/step], [checkout](#recipe_modules-checkout), [docker](#recipe_modules-docker), [env](#recipe_modules-env), [infra](#recipe_modules-infra), [run](#recipe_modules-run), [vars](#recipe_modules-vars)
[DEPS](/infra/bots/recipes/test_canvaskit.py#9): [recipe\_engine/file][recipe_engine/recipe_modules/file], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/step][recipe_engine/recipe_modules/step], [recipe\_engine/time][recipe_engine/recipe_modules/time], [checkout](#recipe_modules-checkout), [docker](#recipe_modules-docker), [env](#recipe_modules-env), [gsutil](#recipe_modules-gsutil), [infra](#recipe_modules-infra), [run](#recipe_modules-run), [vars](#recipe_modules-vars)
&mdash; **def [RunSteps](/infra/bots/recipes/test_canvaskit.py#26)(api):**
&mdash; **def [RunSteps](/infra/bots/recipes/test_canvaskit.py#76)(api):**
&mdash; **def [upload](/infra/bots/recipes/test_canvaskit.py#31)(api):**
### *recipes* / [test\_lottie\_web](/infra/bots/recipes/test_lottie_web.py)
[DEPS](/infra/bots/recipes/test_lottie_web.py#7): [recipe\_engine/file][recipe_engine/recipe_modules/file], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/step][recipe_engine/recipe_modules/step], [checkout](#recipe_modules-checkout), [docker](#recipe_modules-docker), [env](#recipe_modules-env), [infra](#recipe_modules-infra), [run](#recipe_modules-run), [vars](#recipe_modules-vars)

View File

@ -1446,6 +1446,13 @@ func (b *taskBuilder) commonTestPerfAssets() {
}
}
// directUpload adds prerequisites for uploading to GCS.
func (b *taskBuilder) directUpload(gsBucket, serviceAccount string) {
b.recipeProp("gs_bucket", gsBucket)
b.serviceAccount(serviceAccount)
b.cipd(specs.CIPD_PKGS_GSUTIL...)
}
// dm generates a Test task using dm.
func (b *jobBuilder) dm() {
compileTaskName := ""
@ -1453,6 +1460,7 @@ func (b *jobBuilder) dm() {
if !b.extraConfig("LottieWeb") {
compileTaskName = b.compile()
}
directUpload := false
b.addTask(b.Name, func(b *taskBuilder) {
cas := CAS_TEST
recipe := "test"
@ -1473,6 +1481,10 @@ func (b *jobBuilder) dm() {
} else if b.extraConfig("CanvasKit") {
cas = CAS_CANVASKIT
recipe = "test_canvaskit"
if b.doUpload() {
b.directUpload(b.cfg.GsBucketGm, b.cfg.ServiceAccountUploadGM)
directUpload = true
}
} else if b.extraConfig("LottieWeb") {
// CAS_LOTTIE_CI differs from CAS_LOTTIE_WEB in that it includes
// more of the files, especially those brought in via DEPS in the
@ -1535,7 +1547,7 @@ func (b *jobBuilder) dm() {
// Upload results if necessary. TODO(kjlubick): If we do coverage analysis at the same
// time as normal tests (which would be nice), cfg.json needs to have Coverage removed.
if b.doUpload() {
if b.doUpload() && !directUpload {
uploadName := fmt.Sprintf("%s%s%s", PREFIX_UPLOAD, b.jobNameSchema.Sep, b.Name)
depName := b.Name
b.addTask(uploadName, func(b *taskBuilder) {

View File

@ -257,6 +257,44 @@
},
"name": "Test CanvasKit with Docker"
},
{
"cmd": [
"vpython",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"glob",
"[START_DIR]/[SWARM_OUT_DIR]",
"*.png"
],
"infra_step": true,
"name": "find .png images",
"~followup_annotations": [
"@@@STEP_LOG_LINE@glob@[START_DIR]/[SWARM_OUT_DIR]/someimage.png@@@",
"@@@STEP_LOG_END@glob@@@"
]
},
{
"cmd": [
"gsutil",
"-m",
"cp",
"[START_DIR]/[SWARM_OUT_DIR]/*.png",
"gs://skia-infra-gm/dm-images-v1"
],
"name": "upload .png images"
},
{
"cmd": [
"gsutil",
"cp",
"-Z",
"[START_DIR]/[SWARM_OUT_DIR]/dm.json",
"gs://skia-infra-gm/dm-json-v1/2012/05/14/12/abc123/Test-Debian10-EMCC-GCE-GPU-WEBGL1-wasm-Debug-All-CanvasKit/1337000001/dm.json"
],
"name": "upload dm.json"
},
{
"name": "$result"
}

View File

@ -261,6 +261,44 @@
},
"name": "Test CanvasKit with Docker"
},
{
"cmd": [
"vpython",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"glob",
"[START_DIR]/[SWARM_OUT_DIR]",
"*.png"
],
"infra_step": true,
"name": "find .png images",
"~followup_annotations": [
"@@@STEP_LOG_LINE@glob@[START_DIR]/[SWARM_OUT_DIR]/someimage.png@@@",
"@@@STEP_LOG_END@glob@@@"
]
},
{
"cmd": [
"gsutil",
"-m",
"cp",
"[START_DIR]/[SWARM_OUT_DIR]/*.png",
"gs://skia-infra-gm/dm-images-v1"
],
"name": "upload .png images"
},
{
"cmd": [
"gsutil",
"cp",
"-Z",
"[START_DIR]/[SWARM_OUT_DIR]/dm.json",
"gs://skia-infra-gm/trybot/dm-json-v1/2012/05/14/12/1234_7/Test-Debian10-EMCC-GCE-CPU-AVX2-wasm-Debug-All-CanvasKit/1337000001/dm.json"
],
"name": "upload dm.json"
},
{
"name": "$result"
}

View File

@ -4,16 +4,21 @@
# Recipe which runs the Canvaskit tests using docker
import calendar
DEPS = [
'checkout',
'docker',
'env',
'infra',
'recipe_engine/file',
'recipe_engine/json',
'recipe_engine/path',
'recipe_engine/properties',
'recipe_engine/python',
'recipe_engine/step',
'recipe_engine/time',
'gsutil',
'run',
'vars',
]
@ -21,7 +26,52 @@ DEPS = [
DOCKER_IMAGE = 'gcr.io/skia-public/gold-karma-chrome-tests:87.0.4280.88_v1'
INNER_KARMA_SCRIPT = 'skia/infra/canvaskit/test_canvaskit.sh'
DM_JSON = 'dm.json'
def upload(api):
revision = api.properties['revision']
results_dir = api.vars.swarming_out_dir
# Upload the images. It is preferred that the images are uploaded first
# so they exist whenever the json is processed.
image_dest_path = 'gs://%s/dm-images-v1' % api.properties['gs_bucket']
for ext in ['.png']:
files_to_upload = api.file.glob_paths(
'find %s images' % ext,
results_dir,
'*%s' % ext,
test_data=['someimage.png'])
# For some reason, glob returns results_dir when it should return nothing.
files_to_upload = [f for f in files_to_upload if str(f).endswith(ext)]
if len(files_to_upload) > 0:
api.gsutil.cp('%s images' % ext, results_dir.join('*%s' % ext),
image_dest_path, multithread=True)
summary_dest_path = 'gs://%s' % api.properties['gs_bucket']
ref = revision
# Trybot results are siloed by issue/patchset.
if api.vars.is_trybot:
summary_dest_path = '/'.join([summary_dest_path, 'trybot'])
ref = '%s_%s' % (str(api.vars.issue), str(api.vars.patchset))
# Compute the directory to upload results to
now = api.time.utcnow()
summary_dest_path = '/'.join([
summary_dest_path,
'dm-json-v1',
str(now.year ).zfill(4),
str(now.month).zfill(2),
str(now.day ).zfill(2),
str(now.hour ).zfill(2),
ref,
api.vars.builder_name,
str(int(calendar.timegm(now.utctimetuple())))])
# Directly upload dm.json if it exists.
json_file = results_dir.join(DM_JSON)
# -Z compresses the json file at rest with gzip.
api.gsutil.cp('dm.json', json_file,
summary_dest_path + '/' + DM_JSON, extra_args=['-Z'])
def RunSteps(api):
api.vars.setup()
@ -69,6 +119,7 @@ def RunSteps(api):
attempts=3,
)
upload(api)
def GenTests(api):
yield (
@ -77,6 +128,7 @@ def GenTests(api):
'-wasm-Debug-All-CanvasKit'),
repository='https://skia.googlesource.com/skia.git',
revision='abc123',
gs_bucket='skia-infra-gm',
path_config='kitchen',
swarm_out_dir='[SWARM_OUT_DIR]')
)
@ -87,6 +139,7 @@ def GenTests(api):
'-wasm-Debug-All-CanvasKit'),
repository='https://skia.googlesource.com/skia.git',
revision='abc123',
gs_bucket='skia-infra-gm',
path_config='kitchen',
swarm_out_dir='[SWARM_OUT_DIR]',
patch_ref='89/456789/12',

View File

@ -2225,7 +2225,7 @@
},
"Test-Debian10-EMCC-GCE-CPU-AVX2-wasm-Release-All-CanvasKit": {
"tasks": [
"Upload-Test-Debian10-EMCC-GCE-CPU-AVX2-wasm-Release-All-CanvasKit"
"Test-Debian10-EMCC-GCE-CPU-AVX2-wasm-Release-All-CanvasKit"
]
},
"Test-Debian10-EMCC-GCE-CPU-AVX2-wasm-Release-All-PathKit": {
@ -2235,7 +2235,7 @@
},
"Test-Debian10-EMCC-GCE-GPU-AVX2-wasm-Release-All-CanvasKit": {
"tasks": [
"Upload-Test-Debian10-EMCC-GCE-GPU-AVX2-wasm-Release-All-CanvasKit"
"Test-Debian10-EMCC-GCE-GPU-AVX2-wasm-Release-All-CanvasKit"
]
},
"Test-Debian10-GCC-GCE-CPU-AVX2-x86-Debug-All-Docker": {
@ -36267,6 +36267,11 @@
],
"casSpec": "canvaskit",
"cipd_packages": [
{
"name": "infra/gsutil",
"path": "cipd_bin_packages",
"version": "version:4.46"
},
{
"name": "infra/tools/luci-auth/${platform}",
"path": "cipd_bin_packages",
@ -36289,7 +36294,7 @@
"skia/infra/bots/run_recipe.py",
"${ISOLATED_OUTDIR}",
"test_canvaskit",
"{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian10-EMCC-GCE-CPU-AVX2-wasm-Release-All-CanvasKit\",\"gold_hashes_url\":\"https://storage.googleapis.com/skia-infra-gm/hash_files/gold-prod-hashes.txt\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"test\",\"task_id\":\"<(TASK_ID)\"}",
"{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian10-EMCC-GCE-CPU-AVX2-wasm-Release-All-CanvasKit\",\"gold_hashes_url\":\"https://storage.googleapis.com/skia-infra-gm/hash_files/gold-prod-hashes.txt\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"test\",\"task_id\":\"<(TASK_ID)\"}",
"skia"
],
"dependencies": [
@ -36321,7 +36326,8 @@
"max_attempts": 2,
"outputs": [
"test"
]
],
"service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com"
},
"Test-Debian10-EMCC-GCE-CPU-AVX2-wasm-Release-All-PathKit": {
"caches": [
@ -36397,6 +36403,11 @@
],
"casSpec": "canvaskit",
"cipd_packages": [
{
"name": "infra/gsutil",
"path": "cipd_bin_packages",
"version": "version:4.46"
},
{
"name": "infra/tools/luci-auth/${platform}",
"path": "cipd_bin_packages",
@ -36419,7 +36430,7 @@
"skia/infra/bots/run_recipe.py",
"${ISOLATED_OUTDIR}",
"test_canvaskit",
"{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian10-EMCC-GCE-GPU-AVX2-wasm-Release-All-CanvasKit\",\"gold_hashes_url\":\"https://storage.googleapis.com/skia-infra-gm/hash_files/gold-prod-hashes.txt\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"test\",\"task_id\":\"<(TASK_ID)\"}",
"{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian10-EMCC-GCE-GPU-AVX2-wasm-Release-All-CanvasKit\",\"gold_hashes_url\":\"https://storage.googleapis.com/skia-infra-gm/hash_files/gold-prod-hashes.txt\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"test\",\"task_id\":\"<(TASK_ID)\"}",
"skia"
],
"dependencies": [
@ -36451,7 +36462,8 @@
"max_attempts": 2,
"outputs": [
"test"
]
],
"service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com"
},
"Test-Debian10-GCC-GCE-CPU-AVX2-x86-Debug-All-Docker": {
"caches": [
@ -66796,73 +66808,6 @@
"max_attempts": 2,
"service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com"
},
"Upload-Test-Debian10-EMCC-GCE-CPU-AVX2-wasm-Release-All-CanvasKit": {
"caches": [
{
"name": "vpython",
"path": "cache/vpython"
}
],
"casSpec": "run-recipe",
"cipd_packages": [
{
"name": "infra/gsutil",
"path": "cipd_bin_packages",
"version": "version:4.46"
},
{
"name": "infra/tools/luci-auth/${platform}",
"path": "cipd_bin_packages",
"version": "git_revision:14be8b751c0fb567535f520f8a7bc60c3f40b378"
},
{
"name": "infra/tools/luci/kitchen/${platform}",
"path": ".",
"version": "git_revision:14be8b751c0fb567535f520f8a7bc60c3f40b378"
},
{
"name": "infra/tools/luci/vpython/${platform}",
"path": "cipd_bin_packages",
"version": "git_revision:14be8b751c0fb567535f520f8a7bc60c3f40b378"
}
],
"command": [
"cipd_bin_packages/vpython${EXECUTABLE_SUFFIX}",
"-u",
"skia/infra/bots/run_recipe.py",
"${ISOLATED_OUTDIR}",
"upload_dm_results",
"{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian10-EMCC-GCE-CPU-AVX2-wasm-Release-All-CanvasKit\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}",
"skia"
],
"dependencies": [
"Housekeeper-PerCommit-BundleRecipes",
"Test-Debian10-EMCC-GCE-CPU-AVX2-wasm-Release-All-CanvasKit"
],
"dimensions": [
"cpu:x86-64-Haswell_GCE",
"gpu:none",
"machine_type:n1-highmem-2",
"os:Debian-10.3",
"pool:Skia"
],
"env_prefixes": {
"PATH": [
"cipd_bin_packages",
"cipd_bin_packages/bin"
],
"VPYTHON_VIRTUALENV_ROOT": [
"cache/vpython"
]
},
"execution_timeout_ns": 3600000000000,
"extra_tags": {
"log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations"
},
"io_timeout_ns": 3600000000000,
"max_attempts": 2,
"service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com"
},
"Upload-Test-Debian10-EMCC-GCE-CPU-AVX2-wasm-Release-All-PathKit": {
"caches": [
{
@ -66930,73 +66875,6 @@
"max_attempts": 2,
"service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com"
},
"Upload-Test-Debian10-EMCC-GCE-GPU-AVX2-wasm-Release-All-CanvasKit": {
"caches": [
{
"name": "vpython",
"path": "cache/vpython"
}
],
"casSpec": "run-recipe",
"cipd_packages": [
{
"name": "infra/gsutil",
"path": "cipd_bin_packages",
"version": "version:4.46"
},
{
"name": "infra/tools/luci-auth/${platform}",
"path": "cipd_bin_packages",
"version": "git_revision:14be8b751c0fb567535f520f8a7bc60c3f40b378"
},
{
"name": "infra/tools/luci/kitchen/${platform}",
"path": ".",
"version": "git_revision:14be8b751c0fb567535f520f8a7bc60c3f40b378"
},
{
"name": "infra/tools/luci/vpython/${platform}",
"path": "cipd_bin_packages",
"version": "git_revision:14be8b751c0fb567535f520f8a7bc60c3f40b378"
}
],
"command": [
"cipd_bin_packages/vpython${EXECUTABLE_SUFFIX}",
"-u",
"skia/infra/bots/run_recipe.py",
"${ISOLATED_OUTDIR}",
"upload_dm_results",
"{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian10-EMCC-GCE-GPU-AVX2-wasm-Release-All-CanvasKit\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}",
"skia"
],
"dependencies": [
"Housekeeper-PerCommit-BundleRecipes",
"Test-Debian10-EMCC-GCE-GPU-AVX2-wasm-Release-All-CanvasKit"
],
"dimensions": [
"cpu:x86-64-Haswell_GCE",
"gpu:none",
"machine_type:n1-highmem-2",
"os:Debian-10.3",
"pool:Skia"
],
"env_prefixes": {
"PATH": [
"cipd_bin_packages",
"cipd_bin_packages/bin"
],
"VPYTHON_VIRTUALENV_ROOT": [
"cache/vpython"
]
},
"execution_timeout_ns": 3600000000000,
"extra_tags": {
"log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations"
},
"io_timeout_ns": 3600000000000,
"max_attempts": 2,
"service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com"
},
"Upload-Test-Debian10-GCC-GCE-CPU-AVX2-x86-Debug-All-Docker": {
"caches": [
{