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

debug mode interaction for non-flask server #1556

Merged
merged 1 commit into from
Jun 25, 2022
Merged

debug mode interaction for non-flask server #1556

merged 1 commit into from
Jun 25, 2022

Conversation

thvu11
Copy link
Contributor

@thvu11 thvu11 commented Jun 17, 2022

Fixes the interaction of the debug mode with available server options.

When having debug=True and specify server argument, the application currently has the interaction as below:

  • server='flask': this works correctly and the application is updated when users edit a file
  • server='tornado': no update when users edit a file
  • server='gevent': no update when users edit a file

Changes proposed in this pull request:

  • for tornado, tornado.autoreload is enabled if debug is true
  • for gevent, because it doesn't support automatic detection for code changes, the application'll display a log message suggesting users to try other options

Copy link
Member

@Ruwann Ruwann left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

Left one comment, maybe we can make it work on gevent. Do you have time to take a look at that?

Just so you know, this might get changed/deleted for the version 3.x rework anyway - don't have a good view on that atm

connexion/apps/flask_app.py Show resolved Hide resolved
@thvu11
Copy link
Contributor Author

thvu11 commented Jun 23, 2022

Just so you know, this might get changed/deleted for the version 3.x rework anyway - don't have a good view on that atm

No worries, I am exciting to see how things will be shaped up in version 3.x and make some contributions to the future development. Even though this might get change, it's still a good idea to keep an eye on how everything interacts in the debug option.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 2513466834

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 94.342%

Totals Coverage Status
Change from base Build 2416536603: 0.0%
Covered Lines: 2651
Relevant Lines: 2810

💛 - Coveralls

@RobbeSneyders RobbeSneyders merged commit 1d3d6c5 into spec-first:main Jun 25, 2022
@thvu11 thvu11 deleted the feature/debug-mode-in-non-flask-server branch June 26, 2022 01:26
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.

None yet

4 participants