Skip to content

Terminal session not killed when user cancel build

Summary

When the user uses an executor that supports interactive web terminals and clicks "cancel" on a running build that has a terminal attached to it, the terminal connection is not removed.

Steps to reproduce

  1. Start a job with an executor that supports web terminals
  2. Click Debug button
  3. Wait for build script to finish and for the terminal timeout to take effect.
  4. Click cancel button from the job page
  5. Go back to the terminal page and type something

Actual behavior

The user can still use the terminal and still can use it as if the build is running

Expected behavior

As soon as the user clicks cancel the websocket connection is closed and the terminal session is removed as well, gracefully.

Relevant logs and/or screenshots

Screen_Recording_2018-10-08_at_09.30.18

Environment description

  1. shell executor
  2. kubernetes executor
  3. docker executor

Used GitLab Runner version

11.3^