Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add option to ssh into GitHub Actions for debugging #644

Merged
merged 2 commits into from
Oct 3, 2022
Merged

Add option to ssh into GitHub Actions for debugging #644

merged 2 commits into from
Oct 3, 2022

Conversation

ascillitoe
Copy link
Contributor

Alibi Detect equivalent of SeldonIO/alibi#770.

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

  1. Go to the "CI" workflows section on the Alibi Detect GitHub Actions page:

  2. Click on "Run Workflow", and select the "Enable tmate debugging" toggle:
    image

  3. Select the workflow once it starts, and then select the build of interest (e.g. ubuntu-latest, 3.10.6):
    image

  4. Once the workflow reaches the Setup tmate session step, click on the toggle to expand it:
    image

  5. Copy and paste the ssh command that is being printed to your terminal e.g. ssh TaHAR65KFbjbSdrkwxNz996TL@nyc1.tmate.io in this case.

  6. Run the ssh command. Assuming your ssh keys are properly set up for github, you should now be inside the GutHub Action runner:
    image

  7. The tmate session is opened after the Python and pip installs are completed, so you should be ready to run alibi-detect and debug as required.

Additional instructions

  • If the registered public SSH key is not your default private SSH key, you will need to specify the path manually, like so: ssh -i .
  • Once you have finished debugging, you can continue the workflow (i.e. let the full build CI run) by running touch continue whilst in the root directory (~/work/alibi-detect/alibi-detect). This will close the tmate session.
  • This new capability is currently temperamental on the 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.

@ascillitoe ascillitoe requested review from jklaise and mauicv October 3, 2022 08:53
@codecov-commenter
Copy link

Codecov Report

Merging #644 (892ba60) into master (c6e78fc) will decrease coverage by 0.03%.
The diff coverage is n/a.

❗ Current head 892ba60 differs from pull request most recent head 3468eaa. Consider uploading reports for the commit 3468eaa to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #644      +/-   ##
==========================================
- Coverage   78.83%   78.80%   -0.04%     
==========================================
  Files         123      123              
  Lines        8747     8747              
==========================================
- Hits         6896     6893       -3     
- Misses       1851     1854       +3     
Flag Coverage Δ
macos-latest-3.10 ?
ubuntu-latest-3.10 78.72% <ø> (ø)
ubuntu-latest-3.7 78.63% <ø> (ø)
ubuntu-latest-3.8 ?
ubuntu-latest-3.9 78.67% <ø> (ø)
windows-latest-3.9 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
alibi_detect/utils/frameworks.py 87.50% <0.00%> (-4.17%) ⬇️
alibi_detect/utils/_types.py 93.10% <0.00%> (-3.45%) ⬇️

Copy link
Contributor

@jklaise jklaise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ascillitoe ascillitoe merged commit 8f42ee2 into SeldonIO:master Oct 3, 2022
Copy link
Contributor

@mauicv mauicv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small question, otherwise LGTM!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants