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

[Development] Add LocalDev pod debugging #945

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Conversation

red-0ne
Copy link

@red-0ne red-0ne commented Jul 27, 2023

Description

Add debugging capabilites to k8s LocalNet using dlv server and port forwarding.

Summary generated by Reviewpad on 04 Aug 23 08:24 UTC

This pull request includes the following changes:

  1. Added a new make target kube_debug which sets up a port-forwarding to a specific debugging pod.
  2. Added a section on how to debug with dlv in the README.md file.
  3. Updated the Tiltfile to include a new entrypoint for the pocket-image docker build, which enables debugging with dlv.

These changes aim to facilitate debugging and improve the development workflow for Pocket nodes.

Issue

Fixes #183

Type of change

Please mark the relevant option(s):

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Major breaking change
  • Documentation
  • Other

List of changes

  • Change TiltFile to build pocket containers with dlv and start a debugging server to pocket binary
  • Documentation on how to setup port-forwarding and IDE debugging client

Testing

  • make develop_test; if any code changes were made
  • make test_e2e on k8s LocalNet; if any code changes were made
  • e2e-devnet-test passes tests on DevNet; if any code was changed
  • Docker Compose LocalNet; if any major functionality was changed or introduced
  • k8s LocalNet; if any infrastructure or configuration changes were made

Required Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added, or updated, godoc format comments on touched members (see: tip.golang.org/doc/comment)
  • I have tested my changes using the available tooling
  • I have updated the corresponding CHANGELOG

If Applicable Checklist

  • I have updated the corresponding README(s); local and/or global
  • I have added tests that prove my fix is effective or that my feature works
  • I have added, or updated, mermaid.js diagrams in the corresponding README(s)
  • I have added, or updated, documentation and mermaid.js diagrams in shared/docs/* if I updated shared/*README(s)

@red-0ne red-0ne added infra Core infrastructure - not protocol related tooling tooling to support development, testing et al labels Jul 27, 2023
@red-0ne red-0ne requested a review from okdas July 27, 2023 22:10
@red-0ne red-0ne self-assigned this Jul 27, 2023
@reviewpad reviewpad bot added the small Pull request is small label Jul 27, 2023
build/localnet/README.md Show resolved Hide resolved
build/localnet/README.md Outdated Show resolved Hide resolved
build/localnet/README.md Outdated Show resolved Hide resolved
build/localnet/README.md Outdated Show resolved Hide resolved
build/localnet/README.md Outdated Show resolved Hide resolved
build/localnet/README.md Outdated Show resolved Hide resolved
build/localnet/README.md Outdated Show resolved Hide resolved
@red-0ne red-0ne requested a review from Olshansk August 4, 2023 07:49
@red-0ne
Copy link
Author

red-0ne commented Aug 4, 2023

@Olshansk, I did not manage to make it work with lightweight localnet. I think we should check if it's malfunctioning and ship this without it.

@okdas , Do you think we could toggle liveness/readiness checks with make debug_pod run/cancellation?

@Olshansk
Copy link
Member

Olshansk commented Aug 7, 2023

@red-0ne What is this still a draft? Asking to understand in review process.

@red-0ne
Copy link
Author

red-0ne commented Aug 8, 2023

@red-0ne What is this still a draft? Asking to understand in review process.

This still does not have dlv on lightweight localnet. I'm OK having this on k8s only for now and switch it as ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra Core infrastructure - not protocol related small Pull request is small tooling tooling to support development, testing et al
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

[Development] Documentation for local debugging using dlv
2 participants