Skip to content

Re-add shell debug util #3024

Closed
Closed

Description

@sipsma

A while back we had a util that dropped you into an shell with an arbitrary buildkit FS mounted, core of the implementation here: https://github.com/dagger/cloak/blob/561153a1f499948f9593fedf6a8b8603e1939d57/engine/engine.go#L126-L142

This was extremely useful at the time for debugging. Without it, you usually have to submit execops that operate essentially as println debug statements.

We should re-add this util. To start very simple, we can just support the ability to drop into a shell at a given FSID when using the cloak CLI. Further enhancements after that include:

  1. The ability to drop into a failed exec (including the changes made during the failure). While undocumented, Buildkit supports this: https://github.com/moby/buildkit/blob/c9a0f4d2de095591e742d7f411d9ed36a03a1c4e/client/build_test.go#L1278-L1310
  2. The ability to drop into a shell when running a script (perhaps with a CLOAK_DEBUG_SHELL=true env var or something)
  3. The ability to access the shell from a web browser. This requires exposing it over a more generic protocol directly from the cloak engine. One possible path to approaching this is with websockets, as mentioned here.

Activity

  1. dolanor commented on Sep 15, 2022

    @dolanor
    Contributor

    I don't know how compatible it could be with that, but we could explore if it could be integrated with DAP

  2. added this to the Cloak GA milestone on Sep 16, 2022
  3. transferred this issue fromdagger/cloakon Sep 16, 2022
  4. added
    area/engine
    and removed on Dec 5, 2022
  5. sipsma commented on Apr 2, 2024

    @sipsma
    ContributorAuthor

    Addressed in module implementation via terminal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/engine

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions