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

Added server_args to AbstractApp #1173

Merged
merged 4 commits into from
Apr 25, 2020
Merged

Conversation

tahalukmanji
Copy link
Contributor

Fixes # .

Changes proposed in this pull request:
Changed AbstractApp constructor so to accept Flask server args
Changed create_app to pass Flask server args to Flask constructor

@coveralls
Copy link

coveralls commented Mar 5, 2020

Coverage Status

Coverage increased (+0.003%) to 96.294% when pulling af155f4 on tahalukmanji:master into 96bdcb0 on zalando:master.

@tahalukmanji
Copy link
Contributor Author

Whats the status on this commit?

@hjacobs
Copy link
Contributor

hjacobs commented Mar 11, 2020

@tahalukmanji can you explain why you propose this change? What problem are you trying to solve?

@tahalukmanji
Copy link
Contributor Author

We use connexion for REST API and the web endpoint. We are having difficulties sharing common code between pytest runs and live production server runs. The primary issue is that the path to the templates folder is relative, and pytest runs change working directory paths. We want to have an ability to pass the path to the templates folder through the connexion api. That's what my code changes enable. So I can pass in the templates folder path from the connexion constructor.

I don't think the change is very harmful overall, I enabled the passthrough because having the ability to control the flask object is important according to the users taste is necessary. If you think that interaction with the flask object has to be instantiated a certain way, then we should look at other ways of passing in the template folder

Anyways, let me know whether this pull request will get merged or not. We can then plan accordingly. We have another idea in my mind but its an ugly ducktaping solution and we really don't want to implement it.

@@ -10,7 +10,7 @@

class AbstractApp(metaclass=abc.ABCMeta):
def __init__(self, import_name, api_cls, port=None, specification_dir='',
host=None, server=None, arguments=None, auth_all_paths=False, debug=None,
host=None, server=None, server_args=dict(), arguments=None, auth_all_paths=False, debug=None,
Copy link
Collaborator

@dtkav dtkav Mar 12, 2020

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I shall submit a new change...

Copy link
Contributor Author

@tahalukmanji tahalukmanji left a comment

Choose a reason for hiding this comment

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

Changed according to feedback

@tahalukmanji
Copy link
Contributor Author

Hello team, I submitted another commit based on feedback. Can someone please review this and get it merged? Or suggest other comments to get it merged?

@tahalukmanji
Copy link
Contributor Author

What have the gatekeepers decided?

@jmcs
Copy link
Contributor

jmcs commented Apr 8, 2020

Sorry for taking so long to review the PR.

Can you also add **self.server_args to https://github.com/zalando/connexion/blob/c99dda68f4cad9e36815267eb68898220499ee5c/connexion/apps/aiohttp_app.py#L23 and add this option to the documentation?

Taha Lukmanji added 2 commits April 14, 2020 14:37
 * server_args are then passed to Flask aio_https constructors
 * Updated documentation to reflect the change
@tahalukmanji
Copy link
Contributor Author

Sorry for taking so long to review the PR.

Can you also add **self.server_args to

https://github.com/zalando/connexion/blob/c99dda68f4cad9e36815267eb68898220499ee5c/connexion/apps/aiohttp_app.py#L23

and add this option to the documentation?

Hi @jmcs , I have made modifications based on your comment. Please review and let me know if any further changes are required?

@tahalukmanji
Copy link
Contributor Author

Sorry for taking so long to review the PR.
Can you also add **self.server_args to
https://github.com/zalando/connexion/blob/c99dda68f4cad9e36815267eb68898220499ee5c/connexion/apps/aiohttp_app.py#L23

and add this option to the documentation?

Hi @jmcs , I have made modifications based on your comment. Please review and let me know if any further changes are required?

Hello @JCMS and other reviewers, is there anything else to be done? Can we proceed to merge this PR into your master branch?

@tahalukmanji
Copy link
Contributor Author

Hello gatekeepers, what's the status of this review?

@hjacobs
Copy link
Contributor

hjacobs commented Apr 25, 2020

👍

@hjacobs hjacobs merged commit aafc80a into spec-first:master Apr 25, 2020
@tahalukmanji
Copy link
Contributor Author

Thank you @hjacobs and others. Please let me know when this will be available in pypi mirrors.

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

Successfully merging this pull request may close these issues.

5 participants