.github: Enable SSH to linux runners#62280
.github: Enable SSH to linux runners#62280seemethere wants to merge 7 commits intogh/seemethere/121/basefrom
Conversation
Enables SSH to linux GHA runners for FB employees while on the FB VPN SSH keys will be added to runners when the label "with-ssh" is applied to your pull request. Signed-off-by: Eli Uriegas <eliuriegas@fb.com> [ghstack-poisoned]
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit e70b4c1 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. |
|
@seemethere has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Enables SSH to linux GHA runners for FB employees while on the FB VPN SSH keys will be added to runners when the label "with-ssh" is applied to your pull request. Depnds on meta-pytorch/pytorch-gha-infra#8 Signed-off-by: Eli Uriegas <eliuriegas@fb.com> Differential Revision: [D29941681](https://our.internmc.facebook.com/intern/diff/D29941681) [ghstack-poisoned]
Enables SSH to linux GHA runners for FB employees while on the FB VPN SSH keys will be added to runners when the label "with-ssh" is applied to your pull request. Depnds on meta-pytorch/pytorch-gha-infra#8 Signed-off-by: Eli Uriegas <eliuriegas@fb.com> Differential Revision: [D29941681](https://our.internmc.facebook.com/intern/diff/D29941681) [ghstack-poisoned]
Enables SSH to linux GHA runners for FB employees while on the FB VPN SSH keys will be added to runners when the label "with-ssh" is applied to your pull request. Signed-off-by: Eli Uriegas <eliuriegas@fb.com> ghstack-source-id: 2ae8856 Pull Request resolved: #62280 Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
Enables SSH to linux GHA runners for FB employees while on the FB VPN SSH keys will be added to runners when the label "with-ssh" is applied to your pull request. Depnds on meta-pytorch/pytorch-gha-infra#8 Signed-off-by: Eli Uriegas <eliuriegas@fb.com> Differential Revision: [D29941681](https://our.internmc.facebook.com/intern/diff/D29941681) [ghstack-poisoned]
Enables SSH to linux GHA runners for FB employees while on the FB VPN SSH keys will be added to runners when the label "with-ssh" is applied to your pull request. Signed-off-by: Eli Uriegas <eliuriegas@fb.com> ghstack-source-id: f3c2f14 Pull Request resolved: #62280 Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
Enables SSH to linux GHA runners for FB employees while on the FB VPN SSH keys will be added to runners when the label "with-ssh" is applied to your pull request. Depnds on meta-pytorch/pytorch-gha-infra#8 Signed-off-by: Eli Uriegas <eliuriegas@fb.com> Differential Revision: [D29941681](https://our.internmc.facebook.com/intern/diff/D29941681) [ghstack-poisoned]
Enables SSH to linux GHA runners for FB employees while on the FB VPN SSH keys will be added to runners when the label "with-ssh" is applied to your pull request. Signed-off-by: Eli Uriegas <eliuriegas@fb.com> ghstack-source-id: 6cc87ae Pull Request resolved: #62280 Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
|
@seemethere has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
| # Always hold for active ssh sessions | ||
| if: always() | ||
| run: | | ||
| echo "Holding runner for 2 hours until all ssh sessions have logged out" |
There was a problem hiding this comment.
This means that even if the ssh session is on, the runner will still shut down after 2 hours regardless, right?
There was a problem hiding this comment.
Yes, this is consistent with CircleCI's current re-run with ssh functionality, see: https://circleci.com/docs/2.0/ssh-access-jobs/
| - name: Hold runner for 2 hours or until ssh sessions have drained | ||
| # Always hold for active ssh sessions | ||
| if: always() | ||
| run: | | ||
| echo "Holding runner for 2 hours until all ssh sessions have logged out" | ||
| for _ in $(seq 1440); do | ||
| # Break if no ssh session exists anymore | ||
| if [[ "$(who)" = "" ]]; then | ||
| break | ||
| fi | ||
| echo "." | ||
| sleep 5 | ||
| done |
There was a problem hiding this comment.
looks like this same run script is used in a few different places; would it make sense to put it into .github/scripts and just call it from here?
samestep
left a comment
There was a problem hiding this comment.
lgtm! I guess most of the logic is in https://github.com/seemethere/add-github-ssh-key?
Yup most of the logic for this particular feature is in the terraform for the security groups as well as the the github actions to add the ssh keys. |
Enables SSH to linux GHA runners for FB employees while on the FB VPN SSH keys will be added to runners when the label "with-ssh" is applied to your pull request. Depends on meta-pytorch/pytorch-gha-infra#8 Signed-off-by: Eli Uriegas <eliuriegas@fb.com> Closes meta-pytorch/pytorch-gha-infra#5 Differential Revision: [D29941681](https://our.internmc.facebook.com/intern/diff/D29941681) [ghstack-poisoned]
Enables SSH to linux GHA runners for FB employees while on the FB VPN SSH keys will be added to runners when the label "with-ssh" is applied to your pull request. Signed-off-by: Eli Uriegas <eliuriegas@fb.com> ghstack-source-id: 203f3f6 Pull Request resolved: #62280 Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
|
@seemethere has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Enables SSH to linux GHA runners for FB employees while on the FB VPN SSH keys will be added to runners when the label "with-ssh" is applied to your pull request. Depends on meta-pytorch/pytorch-gha-infra#8 Signed-off-by: Eli Uriegas <eliuriegas@fb.com> Closes meta-pytorch/pytorch-gha-infra#5 Differential Revision: [D29941681](https://our.internmc.facebook.com/intern/diff/D29941681) [ghstack-poisoned]
Enables SSH to linux GHA runners for FB employees while on the FB VPN SSH keys will be added to runners when the label "with-ssh" is applied to your pull request. Signed-off-by: Eli Uriegas <eliuriegas@fb.com> ghstack-source-id: 6ee7575 Pull Request resolved: #62280 Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
|
@seemethere has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
|
@seemethere merged this pull request in c48dfe0. |
Stack from ghstack:
Enables SSH to linux GHA runners for FB employees while on the FB VPN
SSH keys will be added to runners when the label "with-ssh" is applied to
your pull request.
Depends on https://github.com/fairinternal/pytorch-gha-infra/pull/8
Signed-off-by: Eli Uriegas eliuriegas@fb.com
Closes https://github.com/fairinternal/pytorch-gha-infra/issues/5
Differential Revision: D29941681