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

Fallback to the original behavior if prefix is not available (#1068) #1499

Closed

Conversation

yyuu
Copy link

@yyuu yyuu commented Apr 11, 2017

I needed to restore the original behavior because some external applications was actually relying on the behavior.

https://github.com/apache/incubator-airflow/blob/1.8.0/airflow/bin/cli.py#L775

I believe this needs to be fixed in gunicorn side because the caller of gunicorn cannot know how gunicorn behaves on -c before it actually invokes gunicorn.

@ToGoBananas
Copy link

+1

Copy link
Collaborator

@berkerpeksag berkerpeksag left a comment

Choose a reason for hiding this comment

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

I'm fine with keeping the old behavior as a fallback. Please rebase your branch, update the documentation add a test case, thanks!

@berkerpeksag berkerpeksag mentioned this pull request Oct 26, 2017
@benoitc
Copy link
Owner

benoitc commented Oct 26, 2017

@berkerpeksag the change is quite old though (2 years in #1068) . I guess we need to cover it by a test before merging it. Just to make sure we don't forget anything.

Or maybe we can check we try to load a module? Like checking if it has an extension at least. Thoughts?

@berkerpeksag berkerpeksag force-pushed the evaluate-as-module-name-if-no-prefix-available branch from e0171e8 to 4448569 Compare October 31, 2017 04:51
@berkerpeksag
Copy link
Collaborator

@yyuu sorry, I overwrote your original change in gunicorn/app/base.py while I was trying to push a test to your branch.

@berkerpeksag berkerpeksag dismissed their stale review October 31, 2017 05:02

I've addressed my own review comments.

cfg = self.get_config_from_filename(filename)
else:
try:
cfg = self.get_config_from_module_name(location)
Copy link
Owner

Choose a reason for hiding this comment

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

if we re-add that feature, wouldn’it be better to add the warning based kn the principle of least astonishment? Espacially since this chang re-add a behaviour removed 2 years ago. thoughts?

@benoitc
Copy link
Owner

benoitc commented Nov 12, 2017

@berkerpeksag bump.

@berkerpeksag
Copy link
Collaborator

In #1634, we decided not to merge this. We've changed the behavior in 19.4 and our latest bugfix release will be 19.8. Ideally it would be nice to keep backward compatibility in bugfix releases but unfortunately that ship has sailed two years ago. Thank you for your work, @yyuu.

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.

4 participants