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

skaffold debug should use debugpy for Python #5576

Merged
merged 3 commits into from
Mar 18, 2021

Conversation

briandealwis
Copy link
Member

Fixes: #4437

Description
This PR switches skaffold debug to use debugpy for Python from the now-deprecated ptvsd. It recognizes if ptvsd or debugpy is already in use. debugpy has been part of the debug helper images for a while now.

User facing changes (remove if N/A)
skaffold debug now uses debugpy for Python.

@briandealwis briandealwis requested review from loosebazooka and a team as code owners March 18, 2021 19:34
@google-cla google-cla bot added the cla: yes label Mar 18, 2021
}

func hasPyModule(module string, args []string) bool {
if index := util.StrSliceIndex(args, "-m"+module); index >= 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit for consistency:

Suggested change
if index := util.StrSliceIndex(args, "-m"+module); index >= 0 {
if index := util.StrSliceIndex(args, fmt.Sprintf("-m%s", module)); index >= 0 {

@codecov
Copy link

codecov bot commented Mar 18, 2021

Codecov Report

Merging #5576 (ca6b3ad) into master (5ed2556) will decrease coverage by 0.22%.
The diff coverage is 65.67%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5576      +/-   ##
==========================================
- Coverage   71.25%   71.03%   -0.23%     
==========================================
  Files         400      402       +2     
  Lines       14975    15096     +121     
==========================================
+ Hits        10671    10724      +53     
- Misses       3514     3578      +64     
- Partials      790      794       +4     
Impacted Files Coverage Δ
pkg/skaffold/debug/transform_python.go 73.68% <65.67%> (-5.77%) ⬇️
cmd/skaffold/app/cmd/commands.go 81.25% <0.00%> (-9.00%) ⬇️
pkg/skaffold/deploy/kubectl/kubectl.go 65.18% <0.00%> (-1.48%) ⬇️
pkg/skaffold/runner/new.go 63.13% <0.00%> (ø)
pkg/skaffold/runner/runner.go 0.00% <0.00%> (ø)
pkg/skaffold/config/options.go 100.00% <0.00%> (ø)
pkg/skaffold/runner/changeset.go 77.77% <0.00%> (ø)
pkg/skaffold/deploy/kubectl/cli.go 87.50% <0.00%> (ø)
pkg/skaffold/runner/apply.go 0.00% <0.00%> (ø)
cmd/skaffold/app/cmd/apply.go 25.00% <0.00%> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5ed2556...ca6b3ad. Read the comment docs.

Copy link
Contributor

@gsquared94 gsquared94 left a comment

Choose a reason for hiding this comment

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

lgtm!

@gsquared94 gsquared94 merged commit f858971 into GoogleContainerTools:master Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python Debugger Should Support debugpy and ptvsd
2 participants