Skip to content

Commit 4816515

Browse files
ahornbymeta-codesync[bot]
authored andcommitted
register tests if discovered via base retry on public commit
Summary: Register tests if discovered via base_retry, similar to continuous run. Useful if continuous run has not been scheduled for a while Reviewed By: yfeldblum Differential Revision: D86511630 fbshipit-source-id: 1a886162a4bdf434a2d8d669c810afdc5bd37d56
1 parent 3c66400 commit 4816515

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

build/fbcode_builder/getdeps/builder.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from .copytree import simple_copytree
2222
from .dyndeps import create_dyn_dep_munger
2323
from .envfuncs import add_path_entry, Env, path_search
24-
from .fetcher import copy_if_different
24+
from .fetcher import copy_if_different, is_public_commit
2525
from .runcmd import run_cmd
2626

2727
if typing.TYPE_CHECKING:
@@ -1013,7 +1013,13 @@ def list_tests():
10131013
)
10141014
return tests
10151015

1016-
if schedule_type == "continuous" or schedule_type == "testwarden":
1016+
discover_like_continuous = False
1017+
if schedule_type == "continuous" or (
1018+
schedule_type == "base_retry" and is_public_commit(self.build_opts)
1019+
):
1020+
discover_like_continuous = True
1021+
1022+
if discover_like_continuous or schedule_type == "testwarden":
10171023
# for continuous and testwarden runs, disabling retry can give up
10181024
# better signals for flaky tests.
10191025
retry = 0
@@ -1065,7 +1071,7 @@ def list_tests():
10651071

10661072
if schedule_type == "diff":
10671073
runs.append(["--collection", "oss-diff", "--purpose", "diff"])
1068-
elif schedule_type == "continuous":
1074+
elif discover_like_continuous:
10691075
runs.append(
10701076
[
10711077
"--tag-new-tests",

0 commit comments

Comments
 (0)