Add option to ssh into GitHub Actions for debugging #770
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds an option to ssh into GitHub Actions for debugging. The ssh support is only enabled when CI is triggered via manual dispatch, and the option is selected.
Instructions
Go to the "CI" workflows section on the Alibi GitHub Actions page (direct link).
Click on "Run Workflow", and select the "Enable tmate debugging" toggle:
Select the workflow once it starts, and then select the build of interest (e.g.
ubuntu-latest, 3.10.6
):Once the workflow reaches the
Setup tmate session
step, click on the toggle to expand it:Copy and paste the
ssh
command that is being printed to your terminal e.g.ssh [email protected]
in this case.Run the ssh command. Assuming your ssh keys are properly set up for github, you should now be inside the GutHub Action runner:
The tmate session is opened after the Python and pip installs are completed, so you should be ready to run
alibi
and debug as required.Additional instructions
touch continue
whilst in the root directory (~/work/alibi/alibi
). This will close the tmate session.MacOS
build due to this Unstable on Mac due to GitHub API restrictions mxschmitt/action-tmate#69. If the MacOS build fails all the builds are failed. You will need to retrigger the workflow if this happens.TODO's
CONTRIBUTING.md
once finalised.touch continue
, which isn't practical. This doesn't really matter if the default github action timeout is reasonable, but I'm not sure what it is. If it is too long we can set a shorter timeout specific to the tmut session.alibi-detect
.