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

COSI-34: Remote debugging golang on Kubernetes #19

Merged
merged 4 commits into from
Nov 19, 2024

Conversation

anurag4DSB
Copy link
Collaborator

@anurag4DSB anurag4DSB commented Nov 15, 2024

Add docs and configurations around remote debugging

Copy link

codecov bot commented Nov 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.52%. Comparing base (74cb461) to head (303c71b).
Report is 16 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

Components Coverage Δ
🏠 Main Package ∅ <ø> (∅)
🚗 Driver Package 68.09% <ø> (ø)
📡 gRPC Factory Package ∅ <ø> (∅)
🔧 Util Client Package 91.89% <ø> (ø)
@@           Coverage Diff           @@
##             main      #19   +/-   ##
=======================================
  Coverage   75.52%   75.52%           
=======================================
  Files           4        4           
  Lines         237      237           
=======================================
  Hits          179      179           
  Misses         51       51           
  Partials        7        7           
---- 🚨 Try these New Features:

@anurag4DSB anurag4DSB force-pushed the feature/COSI-34-debug-with-delve branch from 2f1f17f to b6065ea Compare November 15, 2024 02:11
@anurag4DSB anurag4DSB marked this pull request as ready for review November 15, 2024 02:16
@anurag4DSB anurag4DSB changed the title Feature/cosi 34 debug with delve COSI-34: Remote debugging golang on Kubernetes Nov 15, 2024
RUN go mod download

# Copy the source code
COPY . .

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you have no .dockerignore to copy only what you need. Maybe it's not much a problem for intermediate stage, but copying all stuff like .git ... takes more time and make bigger layer in cache

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, it might be worth adding a .dockerignore now.
We didn't need it initially as we are using distroless for production.

Copy link
Collaborator Author

@anurag4DSB anurag4DSB Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the file; thanks for the in-person discussion yesterday.

Build the Docker image with Delve by running:

```bash
make container
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, just make a delve-container make command? Since there are two Dockerfiles, I think it makes sense to have two build options. Your call.

Copy link
Collaborator Author

@anurag4DSB anurag4DSB Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took your idea, thanks
Keeps debug and prod env seperate

@anurag4DSB anurag4DSB force-pushed the feature/COSI-34-debug-with-delve branch from 4978ea0 to c055965 Compare November 19, 2024 16:21
@anurag4DSB anurag4DSB merged commit 297b62e into main Nov 19, 2024
8 checks passed
@anurag4DSB anurag4DSB deleted the feature/COSI-34-debug-with-delve branch November 19, 2024 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants