-
Notifications
You must be signed in to change notification settings - Fork 23k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.github: Enable SSH to linux runners #62280
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 pytorch-labs/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 pytorch-labs/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: 2ae885698390d48850ff8e1529ab6e27154e8f56 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 pytorch-labs/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: f3c2f147c0009d596072fe2ee12d7dfa4abdfdab 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 pytorch-labs/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: 6cc87aeac10469430453bfba7ef288630d9debcf 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 pytorch-labs/pytorch-gha-infra#8 Signed-off-by: Eli Uriegas <eliuriegas@fb.com> Closes pytorch-labs/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: 203f3f618eae7897ec37491073a49f70c8e34a81 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 pytorch-labs/pytorch-gha-infra#8 Signed-off-by: Eli Uriegas <eliuriegas@fb.com> Closes pytorch-labs/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: 6ee7575b239737570e264f3a5d16c3cde7f2432e 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