[infra] Make bot that runs DM on the oldest supported SKP version

There are two SKP versions we deal with here:
* The min and current supported versions in src/core/SkPicturePriv.h.
* The SKP asset version that is incremented weekly in infra/bots/assets/skp/VERSION.

We will need to update the asset version used by the bot when the min version in src/core/SkPicturePriv.h is updated.
Instructions on how to do that have been documented in src/core/SkPicturePriv.h.

As noted in https://bugs.chromium.org/p/skia/issues/detail?id=13278#c2 DM currently does not fail when it fails to parse an SKP. Till DM is updated to fail, developers will have to look for blank images in Gold via this new bot to determine when we are failing to support the oldest SKP version.

Bug: skia:13278
Change-Id: I8fff62cc289c3bd6abf5179bcee349baf0a8188a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536106
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This commit is contained in:
Ravi Mistry 2022-05-03 14:51:35 -04:00 committed by SkCQ
parent 6cd730f8f2
commit 716447510a
6 changed files with 159 additions and 3 deletions

View File

@ -454,8 +454,8 @@ func (b *taskBuilder) dmFlags(internalHardwareLabel string) {
}
}
if b.extraConfig("Slug") {
// Test slug drawing
configs = []string{"glslug"}
// Test slug drawing
configs = []string{"glslug"}
}
if b.extraConfig("Direct3D") {
configs = []string{"d3d"}
@ -652,6 +652,14 @@ func (b *taskBuilder) dmFlags(internalHardwareLabel string) {
removeFromArgs("image")
removeFromArgs("colorImage")
removeFromArgs("svg")
} else if b.matchExtraConfig("OldestSupportedSkpVersion") {
// The OldestSupportedSkpVersion bot only renders skps.
removeFromArgs("tests")
removeFromArgs("gm")
removeFromArgs("image")
removeFromArgs("colorImage")
removeFromArgs("lottie")
removeFromArgs("svg")
} else {
// No other bots render the .skps.
removeFromArgs("skp")
@ -1310,6 +1318,8 @@ func (b *taskBuilder) dmFlags(internalHardwareLabel string) {
if b.matchExtraConfig("Lottie") {
b.asset("lottie-samples")
b.recipeProp("lotties", "true")
} else if b.matchExtraConfig("OldestSupportedSkpVersion") {
b.recipeProp("skps", "true")
} else {
b.asset("skimage")
b.recipeProp("images", "true")

View File

@ -83,6 +83,11 @@ const (
// Name prefix for upload jobs.
PREFIX_UPLOAD = "Upload"
// This will have to kept in sync with the kMin_Version in
// src/core/SkPicturePriv.h
// See the comment in that file on how to find the version to use here.
oldestSupportedSkpVersion = 291
)
var (
@ -670,7 +675,8 @@ func (b *jobBuilder) deriveCompileTaskName() string {
"NoGPUThreads", "DDL1", "DDL3", "OOPRDDL", "T8888",
"DDLTotal", "DDLRecord", "9x9", "BonusConfigs", "SkottieTracing", "SkottieWASM",
"GpuTess", "DMSAAStats", "Mskp", "Docker", "PDF", "SkVM", "Puppeteer",
"SkottieFrames", "RenderSKP", "CanvasPerf", "AllPathsVolatile", "WebGL2", "i5"}
"SkottieFrames", "RenderSKP", "CanvasPerf", "AllPathsVolatile", "WebGL2", "i5",
"OldestSupportedSkpVersion"}
keep := make([]string, 0, len(ec))
for _, part := range ec {
if !In(part, ignore) {
@ -1545,6 +1551,8 @@ func (b *taskBuilder) commonTestPerfAssets() {
b.asset("skp", "mskp")
} else if b.os("Android", "ChromeOS", "iOS") {
b.asset("skp", "svg", "skimage")
} else if b.extraConfig("OldestSupportedSkpVersion") {
b.assetWithVersion("skp", oldestSupportedSkpVersion)
} else {
// for desktop machines
b.asset("skimage", "skp", "svg")

View File

@ -4,6 +4,7 @@
package gen_tasks_logic
import (
"fmt"
"log"
"reflect"
"strings"
@ -184,6 +185,17 @@ type uploadAssetCASCfg struct {
path string
}
// assetWithVersion adds the given asset with the given version number to the
// task as a CIPD package.
func (b *taskBuilder) assetWithVersion(assetName string, version int) {
pkg := &specs.CipdPackage{
Name: fmt.Sprintf("skia/bots/%s", assetName),
Path: assetName,
Version: fmt.Sprintf("version:%d", version),
}
b.cipd(pkg)
}
// asset adds the given assets to the task as CIPD packages.
func (b *taskBuilder) asset(assets ...string) {
shouldIsolate := b.useIsolatedAssets()

View File

@ -488,6 +488,7 @@
{"name": "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All",
"cq_config": {}
},
{"name": "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-OldestSupportedSkpVersion"},
{"name": "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN"},
{"name": "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-BonusConfigs",
"cq_config": {}

View File

@ -2046,6 +2046,11 @@
"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-NativeFonts"
]
},
"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-OldestSupportedSkpVersion": {
"tasks": [
"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-OldestSupportedSkpVersion"
]
},
"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-SK_USE_DISCARDABLE_SCALEDIMAGECACHE": {
"tasks": [
"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-SK_USE_DISCARDABLE_SCALEDIMAGECACHE"
@ -42851,6 +42856,107 @@
],
"service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com"
},
"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-OldestSupportedSkpVersion": {
"caches": [
{
"name": "vpython",
"path": "cache/vpython"
}
],
"casSpec": "test",
"cipd_packages": [
{
"name": "infra/3pp/tools/cpython/linux-amd64",
"path": "cipd_bin_packages/cpython",
"version": "version:2@2.7.18.chromium.42"
},
{
"name": "infra/3pp/tools/cpython3/linux-amd64",
"path": "cipd_bin_packages/cpython3",
"version": "version:2@3.8.10.chromium.19"
},
{
"name": "infra/gsutil",
"path": "cipd_bin_packages",
"version": "version:4.46"
},
{
"name": "infra/tools/luci-auth/${platform}",
"path": "cipd_bin_packages",
"version": "git_revision:34ecdc8775563915792e05ba9d921342808ae2dc"
},
{
"name": "infra/tools/luci/kitchen/${platform}",
"path": ".",
"version": "git_revision:34ecdc8775563915792e05ba9d921342808ae2dc"
},
{
"name": "infra/tools/luci/vpython-native/${platform}",
"path": "cipd_bin_packages",
"version": "git_revision:34ecdc8775563915792e05ba9d921342808ae2dc"
},
{
"name": "infra/tools/luci/vpython/${platform}",
"path": "cipd_bin_packages",
"version": "git_revision:34ecdc8775563915792e05ba9d921342808ae2dc"
},
{
"name": "skia/bots/skp",
"path": "skp",
"version": "version:291"
}
],
"command": [
"cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}",
"-u",
"skia/infra/bots/run_recipe.py",
"${ISOLATED_OUTDIR}",
"test",
"{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-OldestSupportedSkpVersion\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"OldestSupportedSkpVersion\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"skp\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-OldestSupportedSkpVersion\\\",\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\",\\\"task_id\\\":\\\"<(TASK_ID)\\\"}\",\"do_upload\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"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)\",\"resources\":\"true\",\"revision\":\"<(REVISION)\",\"skps\":\"true\",\"swarm_out_dir\":\"test\",\"task_id\":\"<(TASK_ID)\"}",
"skia"
],
"dependencies": [
"Build-Debian10-Clang-x86_64-Debug",
"Housekeeper-PerCommit-BundleRecipes"
],
"dimensions": [
"cpu:x86-64-Haswell_GCE",
"machine_type:n1-standard-16",
"os:Debian-10.3",
"pool:Skia"
],
"environment": {
"RECIPES_USE_PY3": "true",
"VPYTHON_LOG_TRACE": "1"
},
"env_prefixes": {
"PATH": [
"cipd_bin_packages/cpython",
"cipd_bin_packages/cpython/bin",
"cipd_bin_packages/cpython3",
"cipd_bin_packages/cpython3/bin",
"cipd_bin_packages",
"cipd_bin_packages/bin"
],
"VPYTHON_DEFAULT_SPEC": [
"skia/.vpython"
],
"VPYTHON_VIRTUALENV_ROOT": [
"cache/vpython"
]
},
"execution_timeout_ns": 14400000000000,
"expiration_ns": 72000000000000,
"extra_tags": {
"log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations"
},
"io_timeout_ns": 14400000000000,
"max_attempts": 2,
"outputs": [
"test"
],
"service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com"
},
"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-SK_USE_DISCARDABLE_SCALEDIMAGECACHE": {
"caches": [
{

View File

@ -117,6 +117,25 @@ public:
kAnisotropicFilter = 92,
// Only SKPs within the min/current picture version range (inclusive) can be read.
//
// When updating kMin_Version also update oldestSupportedSkpVersion in
// infra/bots/gen_tasks_logic/gen_tasks_logic.go
//
// Steps on how to find which oldestSupportedSkpVersion to use:
// 1) Find the git hash when the desired kMin_Version was the kCurrent_Version from the
// git logs: https://skia.googlesource.com/skia/+log/main/src/core/SkPicturePriv.h
// Eg: https://skia.googlesource.com/skia/+/bfd330d081952424a93d51715653e4d1314d4822%5E%21/#F1
//
// 2) Use that git hash to find the SKP asset version number at that time here:
// https://skia.googlesource.com/skia/+/bfd330d081952424a93d51715653e4d1314d4822/infra/bots/assets/skp/VERSION
//
// 3) Use the SKP asset version number from step 3 to be the oldestSupportedSkpVersion in
// infra/bots/gen_tasks_logic/gen_tasks_logic.go
//
// 4) Run `make -C infra/bots train`
//
// Contact the Infra Gardener (or directly ping rmistry@) if the above steps do not work
// for you.
kMin_Version = kPictureShaderFilterParam_Version,
kCurrent_Version = kAnisotropicFilter
};