You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "essobedo (via GitHub)" <gi...@apache.org> on 2023/06/26 18:13:04 UTC

[GitHub] [camel-k] essobedo opened a new pull request, #4517: Ref #4513: Allow to remote debug the Operator

essobedo opened a new pull request, #4517:
URL: https://github.com/apache/camel-k/pull/4517

   fixes #4513
   
   ## Motivation
   
   Since the code refactoring for Camel-K 2, it is much harder to debug the operator, especially on MacOS. The goal of this task is to provide a way to remote debug the operator in order to be closer to the target environment and to be local OS agnostic.
   
   ## Modifications:
   
   * Add a debug mode in the makefile to add the required flags at build time to make the program compatible with the remote debugging
   * Publish a specific image with delve installed in debug mode
   * Configure the pod in such a way that the operator is launched through delve
   * Add a doc describing how to use it
   
   **Release Note**
   ```release-note
   Allow to remote debug the Operator
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] essobedo commented on pull request #4517: Ref #4513: Allow to remote debug the Operator

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on PR #4517:
URL: https://github.com/apache/camel-k/pull/4517#issuecomment-1607988716

   @squakez here is the branch showing the idea, please tell me what you think of it. It is not too intrusive and will work whatever the local OS used


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] essobedo commented on a diff in pull request #4517: Ref #4513: Allow to remote debug the Operator

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on code in PR #4517:
URL: https://github.com/apache/camel-k/pull/4517#discussion_r1243250541


##########
build/Dockerfile:
##########
@@ -56,3 +56,11 @@ RUN mkdir -p /etc/maven/m2 \
 USER 1000
 
 ADD build/_output/bin/kamel /usr/local/bin/kamel
+
+FROM golang:1.19 as go

Review Comment:
   I see, no problem, I can change that



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] essobedo commented on pull request #4517: Ref #4513: Allow to remote debug the Operator

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on PR #4517:
URL: https://github.com/apache/camel-k/pull/4517#issuecomment-1608906047

   > I think it's a great idea. I have some minor concerns however related to the fact we're including debugging bits in the production Docker container image. I'd prefer having a separate dockerfile, and a separate Make (ie, `make images-debug`) to take care of that. In this way the release process is not going to be affected and we still have the possibility to create a debugging image and a separate management.
   
   How the release process is affected? I don't get your remark. The production image if built with `make images` is the exact same as before so I don't get the idea of having a separate dockerfile the result will be the same. And if the image is built in debug mode, the tag name won't be the same as it is prefixed by "-debug" and it is only in that case that the image will include debugging bits 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] squakez commented on pull request #4517: Ref #4513: Allow to remote debug the Operator

Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on PR #4517:
URL: https://github.com/apache/camel-k/pull/4517#issuecomment-1609042054

   > > Okey, I missed the target parameter. It could be good then, though, for maintenance reason I still think it would be easier to have separate Dockerfile, but I leave this to your judgment.
   > 
   > It is not clear to me what is the drawback of this approach in terms of maintenance, could you please clarify? What I can tell is that having a separate Dockerfile means that I will need to deal with 2 Docker images (original + debug) instead of only one since I won't be able to rely on stages anymore which makes the whole debugging process much more cumbersome
   
   It's a matter of organization (at least the way I prefer organizing the stuff). Having 2 separate configuration makes easy (again, to me) understanding what are the requirement for a "normal" build and which are the ones for a "debug" build. The way I proposed was to have 2 separate dockerfiles, being the debug dockerfile inheriting from the "normal" build. Then, I think we can have a `make images-debug` that takes care to do 2 builds, the normal `make images` and some docker build and push of the new debug image.
   
   Said that, it's my personal taste and opinion. I leave to your judgment if you want to follow up these advises or proceed with the PR the way it is.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] claudio4j commented on a diff in pull request #4517: Ref #4513: Allow to remote debug the Operator

Posted by "claudio4j (via GitHub)" <gi...@apache.org>.
claudio4j commented on code in PR #4517:
URL: https://github.com/apache/camel-k/pull/4517#discussion_r1242878401


##########
.gitignore:
##########
@@ -176,3 +176,7 @@ config/**/*.gen.json
 # Fabric8 CRDs
 java/target
 pkg/resources/resources.go
+
+MAC OS files

Review Comment:
   Add a # for comment



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] gansheer commented on a diff in pull request #4517: Ref #4513: Allow to remote debug the Operator

Posted by "gansheer (via GitHub)" <gi...@apache.org>.
gansheer commented on code in PR #4517:
URL: https://github.com/apache/camel-k/pull/4517#discussion_r1243247993


##########
build/Dockerfile:
##########
@@ -56,3 +56,11 @@ RUN mkdir -p /etc/maven/m2 \
 USER 1000
 
 ADD build/_output/bin/kamel /usr/local/bin/kamel
+
+FROM golang:1.19 as go

Review Comment:
   If it has no impact I would prefer. To be honest it more a maintenance concern. It would probably make is easier when we upgrade the golang version project-wide. We already have 2 different version of temurin image, I feel that is enough :smile: .



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] essobedo commented on pull request #4517: Ref #4513: Allow to remote debug the Operator

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on PR #4517:
URL: https://github.com/apache/camel-k/pull/4517#issuecomment-1609199908

   > Okey, I missed the target parameter. It could be good then, though, for maintenance reason I still think it would be easier to have separate Dockerfile, but I leave this to your judgment.
   
   Unless you have an idea to avoid having to deal with 2 docker images, if you don't mind, I rather prefer to keep it as it is, once again it is not too intrusive, it is only a few lines of code and it is even described as a typical [use case of the multistage build](https://docs.docker.com/build/building/multi-stage/#stop-at-a-specific-build-stage)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] essobedo merged pull request #4517: Ref #4513: Allow to remote debug the Operator

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo merged PR #4517:
URL: https://github.com/apache/camel-k/pull/4517


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] essobedo commented on pull request #4517: Ref #4513: Allow to remote debug the Operator

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on PR #4517:
URL: https://github.com/apache/camel-k/pull/4517#issuecomment-1609009008

   > Okey, I missed the target parameter. It could be good then, though, for maintenance reason I still think it would be easier to have separate Dockerfile, but I leave this to your judgment.
   
   It is not clear to me what is the drawback of this approach in terms of maintenance, could you please clarify? What I can tell is that having a separate Dockerfile means that I will need to deal with 2 Docker images (original + debug) instead of only one since I won't be able to rely on stages anymore which makes the whole debugging process much more cumbersome


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] essobedo commented on a diff in pull request #4517: Ref #4513: Allow to remote debug the Operator

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on code in PR #4517:
URL: https://github.com/apache/camel-k/pull/4517#discussion_r1243234051


##########
build/Dockerfile:
##########
@@ -56,3 +56,11 @@ RUN mkdir -p /etc/maven/m2 \
 USER 1000
 
 ADD build/_output/bin/kamel /usr/local/bin/kamel
+
+FROM golang:1.19 as go

Review Comment:
   As you wish but it could be any version of Go, we don't really care as you already have understood



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] gansheer commented on a diff in pull request #4517: Ref #4513: Allow to remote debug the Operator

Posted by "gansheer (via GitHub)" <gi...@apache.org>.
gansheer commented on code in PR #4517:
URL: https://github.com/apache/camel-k/pull/4517#discussion_r1243231962


##########
build/Dockerfile:
##########
@@ -56,3 +56,11 @@ RUN mkdir -p /etc/maven/m2 \
 USER 1000
 
 ADD build/_output/bin/kamel /usr/local/bin/kamel
+
+FROM golang:1.19 as go

Review Comment:
   Shouldn't this be set to the same version as the project 1.18 ? (even if it is mainly used to install dlv)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org