Skip to content

Conversation

@MSP-Greg
Copy link
Member

Description

About seven months ago, code was added that logged warnings if worker hooks were added in a config file, but workers were not used (workers = 0). The code only checks for workers being set in the config file. So, if one uses -w2 as a cli argument, the warnings are incorrectly shown.

Running the additional test in master fails, with the following:

  1) Failure:
TestIntegrationCluster#test_worker_hook_warning_cli [/mnt/c/Greg/GitHub/puma/test/test_integration_cluster.rb:518]:
Warning below should not be shown!
Warning: You specified code to run in a `on_worker_boot` block, but Puma is not configured to run in cluster mode (worker count > 0 ), so your `on_worker_boot` block did not run

Found while working with the new test framework server files...

Your checklist for this pull request

  • I have reviewed the guidelines for contributing to this repository.
  • I have added (or updated) appropriate tests if this PR fixes a bug or adds a feature.
  • My pull request is 100 lines added/removed or less so that it can be easily reviewed.
  • If this PR doesn't need tests (docs change), I added [ci skip] to the title of the PR.
  • If this closes any issues, I have added "Closes #issue" to the PR description or my commit messages.
  • I have updated the documentation accordingly.
  • All new and existing tests passed, including Rubocop.

@MSP-Greg MSP-Greg added the bug label Oct 12, 2023
@MSP-Greg MSP-Greg merged commit 59e658f into puma:master Oct 16, 2023
@MSP-Greg MSP-Greg deleted the 00-fix-worker-warning branch October 16, 2023 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant