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

[PR #7518/8bd42e74 backport][3.8] Fix GunicornWebWorker max_requests_jitter not work #7519

Conversation

patchback[bot]
Copy link
Contributor

@patchback patchback bot commented Aug 12, 2023

This is a backport of PR #7518 as merged into master (8bd42e7).

What do these changes do?

GunicornWebWorker use self.cfg.max_requests which is not add jitter, from https://github.com/benoitc/gunicorn/blob/master/gunicorn/workers/base.py#L56-L60, the correct way is to use sef.max_requests

Are there changes in behavior for the user?

After the PR is merged, the max-requests-jitter parameter of Gunicorn can take effect.

Related issue number

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> for example (588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the pr
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."

`GunicornWebWorker` use `self.cfg.max_requests` which is not add jitter,
from
https://github.com/benoitc/gunicorn/blob/master/gunicorn/workers/base.py#L56-L60,
the correct way is to use `sef.max_requests`

(cherry picked from commit 8bd42e7)
@codecov
Copy link

codecov bot commented Aug 12, 2023

Codecov Report

Merging #7519 (3534d5e) into 3.8 (a0d234d) will decrease coverage by 0.01%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##              3.8    #7519      +/-   ##
==========================================
- Coverage   97.38%   97.37%   -0.01%     
==========================================
  Files         107      107              
  Lines       31039    31039              
  Branches     3937     3937              
==========================================
- Hits        30226    30224       -2     
- Misses        609      610       +1     
- Partials      204      205       +1     
Flag Coverage Δ
CI-GHA 97.23% <66.66%> (-0.01%) ⬇️
OS-Linux 96.88% <66.66%> (+<0.01%) ⬆️
OS-Windows 95.21% <0.00%> (+<0.01%) ⬆️
OS-macOS 96.62% <66.66%> (-0.01%) ⬇️
Py-3.10.11 94.82% <0.00%> (+<0.01%) ⬆️
Py-3.10.12 96.52% <66.66%> (-0.01%) ⬇️
Py-3.11.0 96.16% <66.66%> (ø)
Py-3.6.15 96.36% <66.66%> (-0.01%) ⬇️
Py-3.6.8 94.74% <0.00%> (+<0.01%) ⬆️
Py-3.7.17 96.51% <66.66%> (ø)
Py-3.7.9 94.87% <0.00%> (ø)
Py-3.8.10 94.79% <0.00%> (ø)
Py-3.8.17 96.42% <66.66%> (ø)
Py-3.9.13 94.79% <0.00%> (+<0.01%) ⬆️
Py-3.9.17 96.44% <66.66%> (ø)
Py-pypy7.3.11 93.87% <66.66%> (+<0.01%) ⬆️
VM-macos-latest 96.62% <66.66%> (-0.01%) ⬇️
VM-ubuntu-20.04 96.87% <66.66%> (ø)
VM-ubuntu-latest 96.37% <66.66%> (+<0.01%) ⬆️
VM-windows-latest 95.21% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
aiohttp/worker.py 94.57% <0.00%> (ø)
tests/test_worker.py 98.98% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Dreamsorcerer Dreamsorcerer merged commit 8c4ec62 into 3.8 Aug 12, 2023
33 of 36 checks passed
@Dreamsorcerer Dreamsorcerer deleted the patchback/backports/3.8/8bd42e742acc825e8b2f170c04216da3c767f56e/pr-7518 branch August 12, 2023 15:59
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

2 participants