Skip to content

Commit 4c7a2a4

Browse files
r-barnesmeta-codesync[bot]
authored andcommitted
Back out "Add tmate SSH debugging to generated GitHub Actions workflows"
Summary: Make security people happy. Original commit changeset: 8e805446a9b5 Original Phabricator Diff: D96800077 Reverts the tmate workflow_dispatch input and Setup tmate session step from generated GitHub Actions workflows. Generated yml files are regenerated in the follow-up commit. Reviewed By: bigfootjon Differential Revision: D104104739 fbshipit-source-id: 3e881b1a120523b3ab2191e8eda2c6806826432e
1 parent ffc61ae commit 4c7a2a4

1 file changed

Lines changed: 4 additions & 30 deletions

File tree

build/fbcode_builder/getdeps.py

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,15 +1011,6 @@ def run_project_cmd(self, args, loader, manifest):
10111011
class GenerateGitHubActionsCmd(ProjectCmdBase):
10121012
RUN_ON_ALL = """ [push, pull_request]"""
10131013

1014-
WORKFLOW_DISPATCH_TMATE = """
1015-
workflow_dispatch:
1016-
inputs:
1017-
tmate_enabled:
1018-
description: 'Start a tmate SSH session on failure'
1019-
required: false
1020-
default: false
1021-
type: boolean"""
1022-
10231014
def run_project_cmd(self, args, loader, manifest):
10241015
platforms = [
10251016
HostType("linux", "ubuntu", "24"),
@@ -1034,35 +1025,24 @@ def run_project_cmd(self, args, loader, manifest):
10341025

10351026
def get_run_on(self, args):
10361027
if args.run_on_all_branches:
1037-
return (
1038-
"""
1039-
push:
1040-
pull_request:"""
1041-
+ self.WORKFLOW_DISPATCH_TMATE
1042-
)
1028+
return self.RUN_ON_ALL
10431029
if args.cron:
10441030
if args.cron == "never":
10451031
return " {}"
10461032
elif args.cron == "workflow_dispatch":
1047-
return self.WORKFLOW_DISPATCH_TMATE
1033+
return "\n workflow_dispatch"
10481034
else:
1049-
return (
1050-
f"""
1035+
return f"""
10511036
schedule:
10521037
- cron: '{args.cron}'"""
1053-
+ self.WORKFLOW_DISPATCH_TMATE
1054-
)
10551038

1056-
return (
1057-
f"""
1039+
return f"""
10581040
push:
10591041
branches:
10601042
- {args.main_branch}
10611043
pull_request:
10621044
branches:
10631045
- {args.main_branch}"""
1064-
+ self.WORKFLOW_DISPATCH_TMATE
1065-
)
10661046

10671047
# TODO: Break up complex function
10681048
def write_job_for_platform(self, platform, args): # noqa: C901
@@ -1494,12 +1474,6 @@ def cmake_arg_for(name):
14941474
" run: gh cache list --repo ${{ github.repository }} --sort size_in_bytes --order desc --limit 30\n"
14951475
)
14961476

1497-
out.write(" - name: Setup tmate session\n")
1498-
out.write(
1499-
" if: failure() && github.event_name == 'workflow_dispatch' && inputs.tmate_enabled\n"
1500-
)
1501-
out.write(" uses: mxschmitt/action-tmate@v3\n")
1502-
15031477
def setup_project_cmd_parser(self, parser):
15041478
parser.add_argument(
15051479
"--disallow-system-packages",

0 commit comments

Comments
 (0)