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

monitor: breakpoint debugger on monitor and on IDEs (via DAP) #1656

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Commits on Oct 18, 2023

  1. Add BuildOptions.Debug for allowing lazy evaluation of ResultHandler

    This commit adds BuildOptions.Debug that allows skipping the evaluation of the
    ResultHandler. The ResultHandler is created without evaluated, so calling Build
    API with this flag always returns an error with the reference ID of that
    (errored) ResultHandler. Note that this state of ResultHandler doesn't contain
    result nor error so any operation on that ResultHandler will result in an error.
    
    Following commit will allow user to do further operations (e.g. evaluation of a
    bulid) using the buildkit client held by that ResultHandler.
    
    Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
    ktock committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    38837a6 View commit details
    Browse the repository at this point in the history
  2. Add Solve API for performing a build on a build definition

    This commit adds Solve API to the controller. This receives a build definition,
    performs that build using ResultHandler held by that session. After Solve
    completes, the client can debug the result using other APIs including Invoke.
    Note that the ResultHandle provided by Solve overwrites the ResultHandle
    previously stored in that session (possibly generated by the past Build or Solve
    API call).
    
    Using this API, user can perform build-and-debugging loop on the same session.
    
    Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
    ktock committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    ca3c7e9 View commit details
    Browse the repository at this point in the history
  3. Enable to get build definition from Inspect API

    This commit adds two fields to the response of Inspect API.
    
    - Definition: Build definition of the first build executed by Build API.
    - CurrentDefinition: Build definition of the latest build executed by Build or
      Solve API.
    
    The client can use these information for debugging the build deeply.
    
    Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
    ktock committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    c420483 View commit details
    Browse the repository at this point in the history
  4. Add walker utility usable for debugging LLB

    Walker is an utility for inspecting and debugging each vertex in an LLB graph.
    
    Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
    ktock committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    a315778 View commit details
    Browse the repository at this point in the history
  5. monitor: support step-by-step breakpoint debugger

    This commit adds a set of commands to monitor for enabling breakpoint debugger.
    This is implemented based on the walker utility for step-by-step LLB inspection.
    For each vertex and breakpoint, monitor calls Solve API so the user can enter to
    the debugger container on each vertex for inspection.
    
    User can enter to the breakpoint debugger mode by --invoke=debug-step flag.
    
    Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
    ktock committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    4a2e6a9 View commit details
    Browse the repository at this point in the history
  6. Support breakpoint debugger integrated to IDEs

    This commit adds the IDE-integrated breakpoint debugger based on walker.
    Now buildx provides DAP (Debug Adapter Protocol) API to IDEs so DAP-aware IDEs
    can call buildx and allow users to perform breakpoint-based debugging on the
    IDE's UI/UX.
    
    Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
    ktock committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    9f493bb View commit details
    Browse the repository at this point in the history
  7. missing usage for dap command

    Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
    crazy-max authored and ktock committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    1a4b2c6 View commit details
    Browse the repository at this point in the history
  8. Fixes for new printer APIs

    Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
    ktock committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    335acca View commit details
    Browse the repository at this point in the history