-
Notifications
You must be signed in to change notification settings - Fork 9
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
{paas}ify not identifying Flask app #129
Comments
oh, and I'll add that because it can't determine the stack correctly, it then fails to identify the runtime correctly since we're using the stack to determine the runtime. |
Was speaking to @chadwcarlson about this issue. Given that requiring other requirement files is a fairly common practice in python, and that there aren't any other consistent methods to fingerprint/identify a flask app, we may need to consider alternatives to identifying a flask-based project. One idea (at least for the MVP) is that if {paas}ify is unable to detect the stack, we prompt the user and ask them if they are deploying any of the following, and then give them a list of the 6 stacks + "other". If they choose one of the 6 we can then set detection to that stack manually. Additionally, we can then ask for the dependency management file they're using since we were unable to ID the stack initially. If they select "other" then we can continue the current flow where we ask the user for the runtime. The reason we're suggesting asking them about the stack first, before the runtime, is based on the what we believe is the current flow in the code. Once we're past the MVP, and especially as we begin to add more stacks, we may need to rethink the order. |
@akalipetis curious with your take here. Flask really seems like the odd one out, and potentially many places where this |
It's a bit complicated, on one hand, we want to limit questions as much as possible, while on the other I understand that there might be cases where we'd like to allow the user to make a few choices. If we can't detect the stack, the user can still select their runtime, so I don't believe this to be a big blocker - if they don't follow the common practices we identify, they can continue to a generic project creation flow which guides them through the different steps, like runtime selection. I believe this is OK for the MVP, but we could further enhance it by allowing the user to select their package managers if we can't detect any. How do you feel about that? |
I think for the MVP we will have to add more documentation then for the Flask stack. Not a problem; we can do that. HOWEVER, moving forward, we're definitely going to have to address this issue in some way. Python doesn't require requirements.txt to be in any specific place, supports requiring other files from inside a requirements file, and the requirements file itself doesn't have to be a specific name. As an example of what I'm talking about is this Django template: Its requirements file is named While in this specific example, we could luck out in matching either on the Similarly, we're using the presence of Similarly, Again, for the MVP, we have to move forward with what we have. But given the above, we're going to need to rethink our {paas}ify strategy for all python-based frameworks we want to support. |
ok, some more feedback in regards to flask. Was testing out a flask based starter kit. It uses SQLAlchemy which requires the database dialect name to start the DATABASE_URL environment variable. SQLAlchemy uses Given the ubiquity of SQLAlchemy in the python space, we may need to consider switching how we construct the DATABASE_URL parameter for flask apps, and perhaps many python-based applications, when a postgres service is added. |
As mentioned in my other issue ( #128 ) i'm trying to {paas}ify my flask app. I know we're using the presence of
requirements.txt
to determine a Pip dependency manager but there's an issue with using the contents of the requirements.txt file to determine the stack.It seems that it is fairly common for flask (maybe many python?) apps to have a requirements.txt file in a project root that require other requirements.txt files. In the case of the one I've been testing, the contents of the root requirements.txt is:
and the true requirements are in the prod/dev.txt files inside of the
requirements
directory.The text was updated successfully, but these errors were encountered: