Skip to content

Commit

Permalink
Change listing action to execute locally rather than on linux-remote-…
Browse files Browse the repository at this point in the history
…execution by default

Summary: The listing action can be ran locally without issue for most test cases. For all mtia platform tests, we can create a listing executor that will run locally

Reviewed By: peterdelevoryas

Differential Revision: D59599433

fbshipit-source-id: 0bb0f35a4b45f0271506e25f3e1ebfe41625801d
  • Loading branch information
Andy Ficek authored and facebook-github-bot committed Jul 16, 2024
1 parent 686bae5 commit 6590d39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions decls/re_test_common.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ def _opts_for_tests_arg() -> Attr:
# {
# "capabilities": Dict<str, str> | None
# "listing_capabilities": Dict<str, str> | None
# "local_listing_enabled": bool | None
# "local_enabled": bool | None
# "use_case": str | None
# "remote_cache_enabled": bool | None
# "dependencies": list<Dict<str, str>> | []
Expand Down
3 changes: 2 additions & 1 deletion tests/re_utils.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def get_re_executors_from_props(ctx: AnalysisContext) -> ([CommandExecutorConfig
remote_cache_enabled = re_props_copy.pop("remote_cache_enabled", None)
re_dependencies = re_props_copy.pop("dependencies", [])
local_enabled = re_props_copy.pop("local_enabled", False)
local_listing_enabled = re_props_copy.pop("local_listing_enabled", False)
re_resource_units = re_props_copy.pop("resource_units", None)
if re_props_copy:
unexpected_props = ", ".join(re_props_copy.keys())
Expand All @@ -69,7 +70,7 @@ def get_re_executors_from_props(ctx: AnalysisContext) -> ([CommandExecutorConfig
listing_executor = default_executor
if listing_capabilities:
listing_executor = CommandExecutorConfig(
local_enabled = local_enabled,
local_enabled = local_listing_enabled or False,
remote_enabled = True,
remote_execution_properties = listing_capabilities,
remote_execution_use_case = use_case or "tpx-default",
Expand Down

0 comments on commit 6590d39

Please sign in to comment.