Skip to content
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

Unable to see tmate.io link/connection string #1

Closed
warrenbuckley opened this issue Aug 27, 2019 · 25 comments · Fixed by #15
Closed

Unable to see tmate.io link/connection string #1

warrenbuckley opened this issue Aug 27, 2019 · 25 comments · Fixed by #15
Assignees

Comments

@warrenbuckley
Copy link

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

@mxschmitt
Copy link
Owner

mxschmitt commented Aug 27, 2019

I also ran into this issue. It seems, that it's GitHub Action related. Have you tried to trigger the Action and go directly into the Checks tab and let it open until it finished with my action?

That should work. If not, feel free to ping me and I'll investigate in more detail.

@mxschmitt mxschmitt self-assigned this Aug 27, 2019
@warrenbuckley
Copy link
Author

warrenbuckley commented Aug 27, 2019

Have you tried to trigger the Action and go directly into the Checks tab

You can see @mxschmitt I am on the Checks tab in the screenshots, so not sure what I can do or where to go?!

@mxschmitt
Copy link
Owner

Have you tried to trigger the Action and go directly into the Checks tab

You can see @mxschmitt I am on the Checks tab in the screenshots, so not sure what I can do or where to go?!

I mean, that you should go there immediately after you have triggered (pushed to the repo) the GitHub Action. Then the live logging should work.

@warrenbuckley
Copy link
Author

@mxschmitt I have done that and the live logs of the git checkout step is fine - but it pauses on your step and refuses to display anything

@mxschmitt
Copy link
Owner

@warrenbuckley
Copy link
Author

Really odd 😞 that it does not work the same for me @mxschmitt
Feel free to trigger a PR on my repo to see if you can debug/repro the issue at all

https://github.com/warrenbuckley/actions-testing

@mxschmitt
Copy link
Owner

Closed because it seems to be working: https://github.com/warrenbuckley/actions-testing/pull/1/checks#step:3:106

@ibrasho
Copy link

ibrasho commented Aug 30, 2019

@mxschmitt I'm facing this issue in some repos that used to work just fine a few days ago.

@ibrasho
Copy link

ibrasho commented Aug 30, 2019

I manage to make it work. I'm still not sure what's the reason.

Pushing and quickly opening the checks tab make it work somehow.

@mxschmitt mxschmitt reopened this Aug 30, 2019
@mxschmitt
Copy link
Owner

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 :/

@andymckay
Copy link

andymckay commented Aug 30, 2019

👋🏽 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.

@andymckay
Copy link

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.

@svenstaro
Copy link

@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.

@mxschmitt
Copy link
Owner

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.

@andymckay
Copy link

@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.

Agreed.

@kceb
Copy link

kceb commented Mar 19, 2020

@andymckay any update? debugging is essential. Since this issue frequently happens to me, the only way I can debug is to constantly push, eating up my macOS 10x minutes.

@testautomation
Copy link

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

@edaemon
Copy link

edaemon commented Mar 19, 2020

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.

@mxschmitt
Copy link
Owner

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!

@shz0116
Copy link

shz0116 commented Mar 20, 2020

Very nice tool. One question is that how can I stop and resume the continuation ? Deleting the "continue" file will work ?

@mxschmitt
Copy link
Owner

Very nice tool. One question is that how can I stop and resume the continuation ? Deleting the "continue" file will work ?

The new release includes the option to continue and run the steps which are after the tmate Action. This you can trigger by creating a file with the name continue either in the root directory or in the directory of your project.

Has this answered your question? Got it not fully.

@shz0116
Copy link

shz0116 commented Mar 20, 2020

Sorry, I think I did not ask the question clearly.
I know by creating a file named "continue" can resume the workflow (run steps after tmate).
Suppose I want to examine the output after running a while, and want to pause the running.
How can I do that ?
Basically, I want to know how to "pause" and "play" alternatively.

@mxschmitt
Copy link
Owner

Sorry, I think I did not ask the question clearly.
I know by creating a file named "continue" can resume the workflow (run steps after tmate).
Suppose I want to examine the output after running a while, and want to pause the running.
How can I do that ?
Basically, I want to know how to "pause" and "play" alternatively.

ah, such a play-pause feature is unfortunately not available and would hard to implement that. I recommend to run the commands for the steps after my step manually via the command-line.

@BillSmith-EDB
Copy link

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.

@AnimMouse
Copy link

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

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

Successfully merging a pull request may close this issue.

10 participants