Feat: enable remote debugging with minikube#4341
Feat: enable remote debugging with minikube#4341markmandel merged 14 commits intoagones-dev:mainfrom
Conversation
|
This is in Work in progress, still need to update things around the agones-sdk, not sure if it's possible to add the option to debug it |
|
Build Failed 😭 Build Id: 0a00fd05-b822-42a7-a796-0880841e1776 Status: FAILURE To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
|
Build Succeeded 🥳 Build Id: c31bb841-be9a-4fa1-aed6-f583fd91ae23 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version: |
|
Build Failed 😭 Build Id: f9d969c3-0bf8-46f5-afe9-38c24c26870d Status: FAILURE To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
f422940 to
9cfdf55
Compare
|
Build Succeeded 🥳 Build Id: 4fdf098a-33e4-4202-baed-27a64aa8e5f0 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version: |
|
Build Succeeded 🥳 Build Id: b6219f42-2f74-4bb4-9443-b6d79bcefd64 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version: |
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
|
Build Succeeded 🥳 Build Id: 9c5a1a36-82e8-49a1-9ee6-519129b11b82 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version: |
markmandel
left a comment
There was a problem hiding this comment.
Exciting stuff. We've kinda blended the two projects into one PR, but I think both are close enough to being done that it's not worth splitting at this point.
| @@ -1,4 +1,4 @@ | |||
| # Developing, Testing and Building Agones | |||
| # Agones Development Documentation | |||
There was a problem hiding this comment.
Love this split - makes things so much more approachable!
build/README.md
Outdated
|
|
||
| #### make helm-repo-update | ||
| # Run tests and build images | ||
| make test-go build-images |
There was a problem hiding this comment.
| make test-go build-images | |
| make lint test-go build-images |
Since linting is not included in test-go ?
build/README.md
Outdated
| Create GKE cluster and install current version of agones. | ||
| The current version should be built and pushed to `$(REGISTRY)` beforehand: | ||
| # Run end-to-end tests | ||
| make test-e2e |
There was a problem hiding this comment.
| make test-e2e |
Shall we delete this, since it won't work on minikube?
| The current version should be built and pushed to `$(REGISTRY)` beforehand: | ||
| # Run end-to-end tests | ||
| make test-e2e | ||
| make minikube-test-e2e |
There was a problem hiding this comment.
| make minikube-test-e2e | |
| # This takes a _while_, so run at your peril! | |
| make minikube-test-e2e |
Given how comprehensive and long e2e tests take, this definitely needs a warning I figure?
There was a problem hiding this comment.
Ooh yep definitively, maybe I will add an example as well to run a single e2e locally (to avoid running them all)
There was a problem hiding this comment.
I was debating this. There are some e2e tests that definitely need more than one node to complete too. Although I don't think we have a make target that let's you pick just one e2e test? (maybe we should).
There was a problem hiding this comment.
It should works with a single one: https://github.com/googleforgames/agones/blob/main/build/README.md#make-test-e2e-integration
It's what I'm using, basically it will run the 4 from https://github.com/googleforgames/agones/blob/main/build/Makefile#L326 and will match the one you put in the args
But I can definitively put the number of nodes to 2 for the make minikube-test-cluster!
build/docs/troubleshooting.md
Outdated
|
|
||
| ## Performance and Profiling Issues | ||
|
|
||
| ### I want to use pprof to profile the controller. |
There was a problem hiding this comment.
Should we move this pprof guide to development-workflow.md? Seems like it would be a good fit?
| @@ -0,0 +1,490 @@ | |||
| # Make Reference Guide | |||
There was a problem hiding this comment.
Not for now - but we should at some point explore having this not be so manual.
build/includes/minikube.mk
Outdated
|
|
||
| # Push debug images to minikube | ||
| # This will load the debug images and retag them to the normal tag | ||
| minikube-push-debug: |
There was a problem hiding this comment.
🤔 random thought - rather than having explicit debug image tags, could/should we reuse the standard tags instead? Then it's just the as pushing via the regular commands, and there is less Makefile targets to maintain?
Basically the same as what we do for pprof builds?
There was a problem hiding this comment.
Totally, that would make things clearer / avoid duplications everywhere etc.
Gonna get rid of all the *_debug_tag and use the original one (and also remove this minikube-push-debug 👌🏼
build/Makefile
Outdated
| # Build controller with debug symbols for debugging | ||
| build-controller-debug-binary: $(ensure-build-image) | ||
| $(GO_BUILD_LINUX_AMD64) \ | ||
| -tags $(GO_BUILD_TAGS) -gcflags="all=-N -l" -o $(go_build_base_path)/cmd/controller/bin/controller.linux.amd64 \ | ||
| $(go_rebuild_flags) $(go_version_flags) -installsuffix cgo $(agones_package)/cmd/controller |
There was a problem hiding this comment.
| # Build controller with debug symbols for debugging | |
| build-controller-debug-binary: $(ensure-build-image) | |
| $(GO_BUILD_LINUX_AMD64) \ | |
| -tags $(GO_BUILD_TAGS) -gcflags="all=-N -l" -o $(go_build_base_path)/cmd/controller/bin/controller.linux.amd64 \ | |
| $(go_rebuild_flags) $(go_version_flags) -installsuffix cgo $(agones_package)/cmd/controller | |
| # Build controller with debug symbols for debugging | |
| build-controller-debug-binary: GO_BUILD_TAGS += "-gcflags="all=-N -l"" | |
| build-controller-debug-binary: build-controller-binary-linux-amd64 |
This looks close enough to make build-controller-binary-linux-amd64 that I think this might work (I haven't tested it though), and shrink maintenance paths. (same for the other targets as well). Worth a shot to avoid duplication.
Similar to what we do here:
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| FROM gcr.io/distroless/static-debian12:nonroot as base |
There was a problem hiding this comment.
My kingdom for some kind of Docker include, but alas it does not exist.
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
I should definitively have done it in 2 PRs, would have been simpler to review my bad 😅 |
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
|
Build Succeeded 🥳 Build Id: 7b49d06a-856f-4c32-ab9c-1c67b6e0f902 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version: |
markmandel
left a comment
There was a problem hiding this comment.
Looking good - just a couple of outstanding bits.
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Should be all good, github might be a bit funky around the comments about the make targets for the binary (it doesn't set them as outdated), but It's updated in the diff 😄 |
|
Build Succeeded 🥳 Build Id: f2d1b85b-1018-4bec-95c7-1a415cadf8f8 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version: |
|
Nice work! |
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
|
Build Succeeded 🥳 Build Id: 1d57e1bb-64ab-4265-909b-8067081c677e The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version: |
* feat: enable remote debugging with minikube * feat: allow agones-sdk in debug mode * feat: pudate minikube port-forwards targets * Feat: fix some minikube commands and update doc * feat: split big readme from build in multiple ones * feat: update doc / make targets * feat: move pprof from troubleshooting to dev-workflow * Feat: fix tags * feat: update doc to create minikube cluters with 2 nodes
What type of PR is this?
/kind documentation
/kind feature
What this PR does / Why we need it:
Enable remote debugging with minikube locally
Which issue(s) this PR fixes:
Closes #4340
Special notes for your reviewer: