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

tests(*): make nginx_worker_processes to take effect properly #14222

Merged
merged 2 commits into from
Feb 5, 2025

Conversation

ms2008
Copy link
Contributor

@ms2008 ms2008 commented Jan 24, 2025

Summary

nginx_worker_processes is the standard configuration in our template, and it has an alias nginx_main_worker_processes. So, no matter which one we configure, both will work. However, if we set these options at the same time, the one that takes effect will be nginx_main_worker_processes.

Since our test suite uses nginx_main_worker_processes, that means using nginx_worker_processes in the test cases is not working.

We have a bunch of test files that are using nginx_worker_processes instead of the nginx_main_worker_processes alias, and making one small change to the kong_test.conf file saves us the trouble of updating all of them (including EE).

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference

Fix #[issue number]

`nginx_worker_processes` is the standard configuration in our template, and it
has an alias `nginx_main_worker_processes`. So, no matter which one we
configure, both will work. However, if we set these options at the same time,
the one that takes effect will be `nginx_main_worker_processes`.

Since our test suite uses
[`nginx_main_worker_processes`](https://github.com/Kong/kong/blob/7a505eaa6870a5
b9e7da914a32464635691f1038/spec/kong_tests.conf#L35), that means using
`nginx_worker_processes` in the test cases is not working.

We have a bunch of test files that are using `nginx_worker_processes` instead of
the `nginx_main_worker_processes` alias, and making one small change to the
kong_test.conf file saves us the trouble of updating all of them (including EE).
@github-actions github-actions bot added the cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee label Jan 24, 2025
@ms2008 ms2008 marked this pull request as ready for review January 24, 2025 09:48
@ms2008 ms2008 merged commit c7a80d7 into master Feb 5, 2025
25 checks passed
@ms2008 ms2008 deleted the fix/test-nginx-worker-num branch February 5, 2025 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants