Fix linting errors
This is due to latest version of lucicfg.
Change-Id: I195db7724cafd97a4be6eed3425f95ebb81916da
Bug: https://github.com/flutter/flutter/issues/106496
Reviewed-on: https://flutter-review.googlesource.com/c/infra/+/31500
Commit-Queue: Keyong Han <keyonghan@google.com>
Reviewed-by: Ricardo Amador <ricardoamador@google.com>
Reviewed-by: Casey Hillers <chillers@google.com>
diff --git a/config/engine_config.star b/config/engine_config.star
index 8db51bd..f9dfae3 100644
--- a/config/engine_config.star
+++ b/config/engine_config.star
@@ -151,7 +151,6 @@
cipd_version = "refs/heads/main",
use_bbagent = True,
)
- list_view_name = "engine-staging"
ci_yaml_config = ci_yaml.ci_yaml("engine", "main")
platform_properties = ci_yaml.platform_properties(ci_yaml_config)
version = None # Use caches from ToT
diff --git a/config/flutter_config.star b/config/flutter_config.star
index 05b97d3..62ce30e 100644
--- a/config/flutter_config.star
+++ b/config/flutter_config.star
@@ -44,7 +44,7 @@
release_triggering_policy,
recipes_ref = release_branches.stable.recipes_ref,
)
- _drone_prod_builders("stable-", release_branches.stable.recipes_ref)
+ _drone_prod_builders("stable-")
ci_yaml.generate(
"flutter",
"beta",
@@ -55,7 +55,7 @@
release_triggering_policy,
recipes_ref = release_branches.beta.recipes_ref,
)
- _drone_prod_builders("beta-", release_branches.beta.recipes_ref)
+ _drone_prod_builders("beta-")
ci_yaml.generate(
"flutter",
"master",
@@ -66,10 +66,10 @@
master_triggering_policy,
recipes_ref = release_branches.master.recipes_ref,
)
- _drone_prod_builders("", release_branches.master.recipes_ref)
+ _drone_prod_builders("")
_drone_try_builders()
-def _drone_prod_builders(prefix, recipes_ref):
+def _drone_prod_builders(prefix):
"""Generate drone builders to help with subshards."""
recipes = ["flutter/flutter_drone"]
for recipe in recipes:
diff --git a/config/lib/ci_yaml/ci_yaml.star b/config/lib/ci_yaml/ci_yaml.star
index 445fb7f..c229d2c 100644
--- a/config/lib/ci_yaml/ci_yaml.star
+++ b/config/lib/ci_yaml/ci_yaml.star
@@ -47,7 +47,7 @@
# lucicfg is only intended to generate LUCI based targets.
SUPPORTED_SCHEDULERS = [SCHEDULER_COCOON, SCHEDULER_LUCI]
-def _recipes(repo, branch, version, recipes_ref):
+def _recipes(repo, branch, recipes_ref):
"""Return the set of recipes specified in ci.yaml."""
recipe_names = {}
ci_yaml = _ci_yaml(repo, branch)
@@ -57,7 +57,7 @@
continue
if target.enabled_branches and branch not in target.enabled_branches:
continue
- recipe_name = _full_recipe_name(target.recipe, version, recipes_ref)
+ recipe_name = _full_recipe_name(target.recipe, recipes_ref)
if recipe_name not in recipe_names.keys():
recipe_names[recipe_name] = target.recipe
for recipe_name, recipe in recipe_names.items():
@@ -144,7 +144,7 @@
def _platform_dimensions(ci_yaml):
"""Gets platform_dimensions from ci_yaml."""
platform_dimensions = {}
- for platform, map in dict(ci_yaml.platform_properties).items():
+ for platform, _ in dict(ci_yaml.platform_properties).items():
platform_dimensions[platform] = {}
for k, v in dict(ci_yaml.platform_properties[platform].dimensions).items():
platform_dimensions[platform][k] = _parse_attribute(k, v)
@@ -153,7 +153,7 @@
def _platform_properties(ci_yaml):
"""Gets platform_properties from ci_yaml."""
platform_properties = {}
- for platform, map in dict(ci_yaml.platform_properties).items():
+ for platform, _ in dict(ci_yaml.platform_properties).items():
platform_properties[platform] = {}
for k, v in dict(ci_yaml.platform_properties[platform].properties).items():
platform_properties[platform][k] = _parse_attribute(k, v)
@@ -215,7 +215,6 @@
properties[k] = v
# Finally, update with target specific properties
- json_list = ["android_sdk_license", "android_sdk_preview_license"]
for k, v in dict(target.properties).items():
if k == "dependencies":
# Merge target dependencies with platform
@@ -271,12 +270,11 @@
properties["dependencies"] = []
return properties
-def _full_recipe_name(recipe_name, version, recipes_ref):
+def _full_recipe_name(recipe_name, recipes_ref):
"""Creates a recipe name for recipe and version.
Args:
recipe_name(str): This is a string with the recipe base name.
- version(str): A string with the build version. E.g. dev, beta, stable.
recipes_ref(str): The git ref pointing to the recipes bundle to use.
Returns:
@@ -376,14 +374,13 @@
caches = _swarming_caches(repo, version, merged_properties["dependencies"], ios_simulators, xcode)
target_args = {
"caches": caches,
- "category": platform.capitalize(),
"dimensions": merged_dimensions,
# On release branches, extend the timeout to handle goma misses.
# TODO(godofredoc): Remove after hotfix 2.5.3 is released.
"execution_timeout": target.timeout * time.minute * 3,
"name": _builder_name(target.name, branch),
"os": merged_properties["os"],
- "recipe": _full_recipe_name(target.recipe, version, recipes_ref),
+ "recipe": _full_recipe_name(target.recipe, recipes_ref),
"repo": repos.GIT_REMOTE[repo],
"properties": merged_properties,
}
@@ -409,6 +406,7 @@
postsubmit_target_args = helpers.merge_dicts({
"priority": 30,
"notifies": notifies,
+ "category": platform.capitalize(),
}, target_args)
# Postsubmit only generates if the target is enabled for this branch, which defaults to true.
@@ -469,7 +467,7 @@
# the try configurations for led recipe tests.
if _is_default_branch(branch):
common.cq_group(repos.GIT_REMOTE[repo])
- _recipes(repo, branch, version, recipes_ref)
+ _recipes(repo, branch, recipes_ref)
_builders(repo, branch, version, testing_ref, dimensions, properties, triggering_policy, notifies = notifies, recipes_ref = recipes_ref)
ci_yaml = struct(
diff --git a/config/lib/common.star b/config/lib/common.star
index b8a61c0..e09347a 100644
--- a/config/lib/common.star
+++ b/config/lib/common.star
@@ -284,8 +284,6 @@
def _try_builder(
name,
list_view_name,
- console_view_name = None,
- category = None,
properties = {},
pool = "luci.flutter.try",
**kwargs):
@@ -313,7 +311,6 @@
name,
console_view_name,
category,
- list_view_name = None,
properties = {},
notifies = None,
**kwargs):
@@ -360,17 +357,18 @@
cq_args = {}
cq_args["builder"] = "try/%s" % kwargs["name"].split("|")[0]
cq_args["cq_group"] = _cq_group_name(kwargs["repo"])
+ new_common_kwargs = {k: v for k, v in common_kwargs.items() if k not in ["category"]}
if kwargs.get("add_cq"):
kwargs.pop("add_cq")
luci.cq_tryjob_verifier(**cq_args)
return _try_builder(
*args,
- **helpers.merge_dicts(common_kwargs, kwargs)
+ **helpers.merge_dicts(new_common_kwargs, kwargs)
)
return try_job, prod_job
-def _mac_builder(properties = {}, caches = None, category = "Mac", os = None, **kwargs):
+def _mac_builder(properties = {}, category = "Mac", os = None, **kwargs):
return _common_builder(
os = os,
properties = properties,
@@ -380,7 +378,6 @@
def _linux_builder(
properties = {},
- caches = None,
category = "Linux",
os = None,
**kwargs):
@@ -393,7 +390,6 @@
def _windows_builder(
properties = {},
- caches = None,
category = "Windows",
os = None,
**kwargs):
@@ -417,7 +413,6 @@
return "".join([w[0] for w in words])[:5].lower()
def _builder_with_subshards(
- name,
properties,
bucket,
os,
@@ -426,7 +421,6 @@
"""Create separate builder config for any subshard in properties["subshards"].
Args:
- name(str): The name of the builder.
bucket(str): The pool to run builder: "try" or "prod".
os(str): The host os to run builder.
properties(dict): Properties passed through to luci builder.