Ability to disable ssh

Hi,

I sometimes ssh into my builds even if there’s not a problem (like to check on progress using information that’s not available from the STDOUT). The ssh stays open for 30 minutes after the tests finish, and as far as I know the only way to close it early is to click cancel, which means that the whole tests are reported as canceled. I’d like to be able to disable ssh after I’m done, and still get success status for the tests. Could there be a way to disable ssh without canceling the whole test or waiting 30 extra minutes?

Thanks!
Heshy

12 Likes

SSH Into the Build Container feature is intended for debugging use only—would it be an option for you to show the information you need via the circle.yml commands? As those commands are plain bash, you should be able to do anything there that you would otherwise do manually.

One thing I use ssh for is to check on the progress of the command as it runs. It writes events into a file, and I use grep “” file | wc -l to check on the progress (which the script itself doesn’t print) and make sure it’s not stuck.

I also use (or maybe I should say abuse…) ssh to sometimes run more extensive tests. They take a while and I don’t want them activating every time, so I have in my circle.yml something like
if [ -f ~/runmoretests ]; then …; fi
and ssh in to touch ~/runmoretests when I want to run them. I guess this is what parameterized builds are for but this was easier…

Got it. I would suggest looking at this API endpoint and seeing if you can automate the selection of short test run vs long test run. In our opinion, SSHing into the build is not too scalable of a solution.

About the progress: if your test runner doesn’t support outputting progress, you could use the background: true modifier to run the tests in the background but then run a command in the foreground that would print out the progress. Would that make sense?

I too would like the ability to stop ssh and the waiting time once I’m done debugging without actually canceling the build. Right now I have to wait up to 30 minutes to do things like making sure the asset collection worked correctly. I’d love something in the UI to “stop ssh and finish the build” but a cli command to call from within the container to do that would be fine as well. It could just punt me out of ssh and then wrap up normally.

Note that cancelled builds don’t collect assets, junit, etc, so if you are debugging these things, then it’s a real pain to wait.

I too will find this feature very useful. I had trouble with git lfs and sshed in. i fixed the problem and the build passed. but the build stayed in ssh phase for 30mins even though it was done. Ability to finish the build would be useful and would enable iterating faster.

+1 for stopping ssh into the build

+1 on introducing stopping ssh into the build

Same here! Please introduce this feature, Circle.

This would be very useful for me too!

As the author of this thread I got notified when one of the CircleCI team linked to it.

Not sure exactly how notifications work, so I’ll cc everyone explicitly.

@frankcarey @yvdinesh @ilyakatz @elenadimitrova @yes @pagameba

Thanks everyone for supporting this request. You may want to “like” that one too.

2 Likes

Oh I’ll also cc @kindlyseth @teeberg @drazisil @matiasgarciaisaia @inderdeepsingh

Didn’t notice the 6 likes were not the same people as the 6 supportive replies. See the previous message.