Skip to content

Disable Python detector's use of PYTHON_VERSION#3919

Merged
briandealwis merged 2 commits intoGoogleContainerTools:masterfrom
briandealwis:i3918-python-panic
Apr 4, 2020
Merged

Disable Python detector's use of PYTHON_VERSION#3919
briandealwis merged 2 commits intoGoogleContainerTools:masterfrom
briandealwis:i3918-python-panic

Conversation

@briandealwis
Copy link
Copy Markdown
Member

Fixes: #3918

Description

The Python language runtime detection for skaffold debug was blindly accepting any image with the PYTHON_VERSION environment variable set. Although this does identify an Python-based image, successfully transforming the container requires that the image's entrypoint or command actually invoke the python interpreter. So the presence of PYTHON_VERSION does not necessarily mean that the image can be transformed

User facing changes (remove if N/A)

Should avoid a possible panic.

Follow-up Work (remove if N/A)

I need to rework the Apply interface to remove the possibility of this nil panic.

@code128: if you are willing to try this on your insta-puller, you can build a private copy of skaffold by running go build -o skaffold ./cmd/skaffold/. Skaffold does require Go 1.14 for building.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2020

Codecov Report

Merging #3919 into master will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted Files Coverage Δ
pkg/skaffold/debug/transform_python.go 84.70% <ø> (-0.36%) ⬇️

@briandealwis briandealwis merged commit ba4a58d into GoogleContainerTools:master Apr 4, 2020
@briandealwis briandealwis deleted the i3918-python-panic branch April 4, 2020 02:28
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.

3 participants