action-tmate: Unable to see tmate.io link/connection string

To get the connection string, just open the Checks tab in your Pull Request and scroll to the bottom. There you can connect either directly per SSH or via a web based terminal.

YML

I have a simple YML action workflow to try this action out

name: CI

on: [push]

jobs:
  build:

    runs-on:  ubuntu-latest
    
    steps:
    - uses: actions/checkout@v1
    
    - name: Setup tmate session
      uses: mxschmitt/action-tmate@v1

Screenshots

I have looked on the PR itself and can not find it and the streaming logs is not listing anything out for me to see the URL, only when I cancel/stop the run can I see the log output and what the tmate.io URL was.

image

image

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 25 (9 by maintainers)

Commits related to this issue

Most upvoted comments

@andymckay I think this whole Action should just basically be part of Github Actions itself. The ability is to live debug a worker is invaluable.

šŸ‘‹šŸ½ Hi there from GitHub. Sorry that you are getting this issue.

It sounds like there’s a possible intermittent race condition going on here. The log is being written before the connection is being opened to the view the logs. If that happens the log isn’t going to be written back to the GitHub UI. I’ll talk to the engineering team and see what we can find out.

Hey all!

I’ve integrated a workaround which will write the connection information every 5 seconds to the stdout. With this change it should be fixed or at least there is now a way to obtain the SSH server information etc. Please let me know if this helps. Thank you and stay healthy!

Hey all!

I’ve integrated a workaround which will write the connection information every 5 seconds to the stdout. With this change it should be fixed or at least there is now a way to obtain the SSH server information etc. Please let me know if this helps. Thank you and stay healthy!

This action is quite handy but what do you think of the idea to make the 5 seconds be a controllable value? Personally, I would like to see it print the info and then wait something like 15 or 30 seconds before printing the connection info again. The problem I have is that I try to select the relevant text in the output window and then do right-mouse click to ā€œcopyā€ but 5 seconds have elapsed causing the copy region to get shifted. I probably would also be interested in an option to only display ssh connection info.

I’ve seen the same issue. Workaround is as described above to be in Github Actions UI before the step is executed.

Workaround

āš ļø Open this view before the step Setup tmate session is executed.

image

Bad news, unfortunately its unlikely we’ll have a fix for this relatively soon, there’s quite a bit of architecture we’ll need to change around on our side. We’ll get there - but I can’t give you a clear timeline of when that might be.

The best solutions right now are all slightly hacky I’m afraid. Is it possible to tell if the ssh connection has been made and if not, then after say 5 seconds print the information out again? This would push the log through the connection to the UI and ensure the user gets the endpoint to connect to.

It is about time that this will be a thing of the past with Actions streaming logs with backscroll.

This doesn’t seem to be a fix, but I’ve found that adding a basic sleep step before the tmate session is set up helps, e.g.:

    steps:
      - name: Sleep...
        run: sleep 20

      - name: Setup tmate session
        uses: mxschmitt/action-tmate@v1

Without that the live logging never appears for me even if I’m monitoring the job from the UI.

In my perspective the described issue is also present, when e.g. a 5 minute long build job will be triggered via a GitHub Action. Then it’s also sometimes not possible to see the live output by clicking on the Action itself in the GitHub Actions Console.

But seems unfortunately a GitHub related issue. I’ve changed nothing since a fews days and more than writing to stdout I also can’t do šŸ˜•