-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🌱 Tiltfile: Enable debugging with delve #5485
Conversation
13e1fbc
to
ff58d0b
Compare
1563a94
to
b8d2ba1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That will be super useful! Thanks for driving this!
/hold Would like someone on MacOS to test. This works on Linux, but on MacOS we have the complexity of Docker Machine. However, given that this is using port forwarding via the API server, it shouldn't require additional networking hacks. |
I'll test it |
@randomvariable Looks great and works on MacOS, thx!! A few comments, mostly nits, but imho it would be great to default to using dlv with |
a25506b
to
6a9184f
Compare
/unhold Have addressed the comments. |
6a9184f
to
fe1ee83
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm pending one question about go version bump
fe1ee83
to
76d869c
Compare
This enables adding the following in tilt-settings.json, for example, to enable a remote debugger to be attached to the core controller on 127.0.0.1:30000 when using Tilt: ``` "debug": { "core": { "race_detector": true, "port": 30000, "profiler_port": 40000, "metrics_port": 40001 }, "kubeadm-bootstrap": { "port": 30001 }, "kubeadm-control-plane": { "port": 30002 }, "docker": { "port": 30003 }, "aws": { "port": 30004 } }, ``` Signed-off-by: Naadir Jeewa <[email protected]>
76d869c
to
c99c420
Compare
/lgtm |
Very nice! |
I'm intending (in another PR) to extend the usage of yq to get rid of editing manifests in place whenever we do e2es as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
/lgtm
Thank you @randomvariable, this is great!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vincepri The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
k8s_yaml(blob(yaml)) | ||
|
||
manager_name = p.get("manager_name") | ||
if manager_name: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this if
line was removed, I get this stack trace when running tilt up
:
local: ./hack/tools/bin/kustomize build ../cluster-api-provider-azure/config/default | ./hack/tools/bin/envsubst
Traceback (most recent call last):
/Users/matt/projects/cluster-api/Tiltfile:342:17: in <toplevel>
/Users/matt/projects/cluster-api/Tiltfile:309:24: in enable_providers
/Users/matt/projects/cluster-api/Tiltfile:288:21: in enable_provider
<builtin>: in k8s_resource
Error: k8s_resource: for parameter "workload": Value should be convertible to string, but is type NoneType
My debugging configuration was happy before, and it's happy when I restore that line. Should I make a PR to restore the if
check?
Signed-off-by: Naadir Jeewa [email protected]
What this PR does / why we need it:
After chatting with @sbueringer , been thinking of ways of making using debuggers easier.
This enables adding the following in tilt-settings.json, for example, to enable a remote debugger to be attached to the core controller on 127.0.0.1:30000 when using Tilt:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #