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

Warn on updated Pythons #440

Closed
edmorley opened this issue Aug 3, 2017 · 9 comments
Closed

Warn on updated Pythons #440

edmorley opened this issue Aug 3, 2017 · 9 comments

Comments

@edmorley
Copy link
Member

edmorley commented Aug 3, 2017

Similar to heroku/heroku-buildpack-ruby#611, I think it would be a good idea to warn if the Python version isn't explicitly specified in runtime.txt. (Though unlike that case it needn't block heroku/heroku-repo#70).

@kennethreitz
Copy link
Contributor

I don't think that's a good idea.

@edmorley
Copy link
Member Author

edmorley commented Aug 4, 2017

By warn I don't mean fail the compile, instead output a friendly:
"We notice that the Python version isn't explicitly specified. It's recommended to do, see {devcenter link}".

Context:
heroku/heroku-repo#70 (comment)

@kennethreitz
Copy link
Contributor

I don't recommend to do so — 99% of apps don't specify one.

@kennethreitz
Copy link
Contributor

I don't want to clutter up 99% of builds with a warning they don't need to see.

@edmorley
Copy link
Member Author

edmorley commented Aug 22, 2017

Some context...

My main concern was how the following interact:

  • The desire to have minimal setup required for new apps (ie have runtime.txt be optional)
  • Sticky Python versions (ie never update to newer default Python, re-use the version first used)

...in that it means 99% of apps will always be using out of date Python and not even know it.

In an ideal world where Python patch version updates never break anything, the buildpack could auto-update users who don't have a runtime.txt thereby preserving both the "keep Heroku friction free" and "keep people protected" aspects.

However that clearly isn't viable, which means the best we can do is try to make it more obvious to users what version they are using, and encouraging them to update it if needed. ie:

  • increasing the visibility of the Python version used
  • encouraging them to update by outputting more blatant warnings for known insecure Python versions (there's already a check during compile for InsecurePlatformWarning but I think that needs to be extended)

However I can understand the desire to not show a warning if most people are going to ignore it. I would be interested to know if there were better ways to try and keep users protected however. What do other buildpacks do?

@kennethreitz
Copy link
Contributor

Let's warn if they don't have runtime.txt set AND python is out of date!

@kennethreitz kennethreitz reopened this Aug 26, 2017
@kennethreitz
Copy link
Contributor

in fact, let's simply things.

Let's just warn if Python's out of date, period.

@kennethreitz kennethreitz changed the title Warn if the Python version isn't explicitly specified in runtime.txt Warn on updated Pythons Aug 29, 2017
@kennethreitz
Copy link
Contributor

this is now implemented!

@edmorley
Copy link
Member Author

Awesome - thank you :-)

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

No branches or pull requests

2 participants